Skip to content

Commit

Permalink
post-review: test changes rolled back
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazark0x committed Nov 4, 2024
1 parent ded0d27 commit c0a667f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions gclient/tests/memory_dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,32 @@ async fn memory_dump() -> Result<()> {
.await?;
assert!(listener.message_processed(message_id).await?.succeed());

assert_eq!(charge_10(&api, program_id, &mut listener).await?, "");
assert_eq!(
charge_10(&api, program_id, &mut listener).await.unwrap(),
""
);

let cleanup = CleanupFolderOnDrop {
path: "./296c6962726".to_string(),
};

api.save_program_memory_dump_at(program_id, None, "./296c6962726/demo_custom.dump")
.await?;
.await
.unwrap();

assert_eq!(
charge_10(&api, program_id, &mut listener).await?,
charge_10(&api, program_id, &mut listener).await.unwrap(),
"Discharged: 20"
);

api.replace_program_memory(program_id, "./296c6962726/demo_custom.dump")
.await?;
.await
.unwrap();

drop(cleanup);

assert_eq!(
charge_10(&api, program_id, &mut listener).await?,
charge_10(&api, program_id, &mut listener).await.unwrap(),
"Discharged: 20"
);

Expand Down

0 comments on commit c0a667f

Please sign in to comment.