Skip to content

Commit b37f0bc

Browse files
committed
Fix test
1 parent 05c81e2 commit b37f0bc

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

crates/vespertide-loader/src/migrations.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ actions:
324324
assert!(err_msg.contains("CARGO_MANIFEST_DIR environment variable not set"));
325325

326326
// Restore the original value if it existed
327-
// Note: In a test environment, we don't restore to avoid affecting other tests
328-
// The serial_test ensures tests run sequentially
329-
drop(original);
327+
if let Some(val) = original {
328+
unsafe {
329+
env::set_var("CARGO_MANIFEST_DIR", val);
330+
}
331+
}
330332
}
331333

332334
#[test]

crates/vespertide-loader/src/models.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,12 @@ mod tests {
374374
let err_msg = result.unwrap_err().to_string();
375375
assert!(err_msg.contains("CARGO_MANIFEST_DIR environment variable not set"));
376376

377-
drop(original);
377+
// Restore the original value if it existed
378+
if let Some(val) = original {
379+
unsafe {
380+
env::set_var("CARGO_MANIFEST_DIR", val);
381+
}
382+
}
378383
}
379384

380385
#[test]

0 commit comments

Comments
 (0)