Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Mar 1, 2024
1 parent 64bd8e5 commit 8426868
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions soroban-sdk/src/tests/env.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{
self as soroban_sdk, contract, contractimpl,
env::EnvTestConfig,
testutils::{Address as _, Logs as _},
Address, Env, Error,
};
Expand Down Expand Up @@ -157,10 +158,18 @@ fn test_snapshot_file_disabled() {
.join("test_snapshot_file");
let p1 = p.with_extension("1.json");
assert!(!p1.exists());
let p2 = p.with_extension("1.json");
assert!(!p2.exists());
{
let _ = Env::default();
let _ = Env::new_with_config(EnvTestConfig {
capture_snapshot_at_drop: false,
});
assert!(!p1.exists());
assert!(!p2.exists());
}
assert!(p1.exists());
assert!(!p2.exists());
let _ = std::fs::remove_file(&p1);
let _ = std::fs::remove_file(&p2);
}

0 comments on commit 8426868

Please sign in to comment.