diff --git a/crates/spaceshd/src/lifecycle.rs b/crates/spaceshd/src/lifecycle.rs index 26d3736..3412c45 100644 --- a/crates/spaceshd/src/lifecycle.rs +++ b/crates/spaceshd/src/lifecycle.rs @@ -56,6 +56,7 @@ mod tests { #[test] fn paths_live_under_spacesh_dir() { + let _serial = crate::test_support::serial(); let dir = spacesh_dir().unwrap(); assert!(socket_path().unwrap().starts_with(&dir)); assert!(lock_path().unwrap().starts_with(&dir)); @@ -75,8 +76,9 @@ mod tests { #[test] fn socket_path_honors_env_override() { - // Note: set/remove around the assertion; tests in this module run serially enough, - // but guard by restoring afterwards. + let _serial = crate::test_support::serial(); + // Note: set/remove around the assertion; serialized against the other + // env-sensitive lifecycle test via the crate's serial() lock. std::env::set_var("SPACESH_SOCK", "/tmp/spacesh-test-override.sock"); let p = socket_path().unwrap(); std::env::remove_var("SPACESH_SOCK");