From 2394941fc6ba72ad7e6cd0bf3b1e3e525f8421ec Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sat, 14 Nov 2026 20:06:31 +0000 Subject: [PATCH] test(computer_config): use temp-dir profile paths in browser config tests The persistent-profile tests hardcoded a Unix-rooted path, which is relative on Windows and made the assertions platform-dependent. The paths are now built from the temp directory so they are absolute everywhere, and the dependency lockfile picks up the corresponding bus crate version bumps. Auto-committed-on: cuttlefish Co-authored-by: Medulla (cherry picked from commit 3f3afa0eaffb8426023315a898eb03a52883c91e) --- crates/openhuman-app/Cargo.lock | 6 +++--- .../src/modules/computer_config_tests.rs | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lock index aba0bdfc84f..b8cd13e5c21 100644 --- a/crates/openhuman-app/Cargo.lock +++ b/crates/openhuman-app/Cargo.lock @@ -7899,7 +7899,7 @@ dependencies = [ [[package]] name = "tinycomputer-bus" -version = "0.16.0" +version = "0.17.0" dependencies = [ "base64 0.22.1", "serde", @@ -8268,7 +8268,7 @@ dependencies = [ [[package]] name = "tinysecurity-bus" -version = "0.21.0" +version = "0.21.1" dependencies = [ "serde", "thiserror 2.0.21", @@ -8545,7 +8545,7 @@ dependencies = [ [[package]] name = "tinywallet-bus" -version = "0.30.0" +version = "0.30.1" dependencies = [ "serde", "serde_json", diff --git a/crates/openhuman-core/src/modules/computer_config_tests.rs b/crates/openhuman-core/src/modules/computer_config_tests.rs index 20f2ac1286c..49e2c81b06b 100644 --- a/crates/openhuman-core/src/modules/computer_config_tests.rs +++ b/crates/openhuman-core/src/modules/computer_config_tests.rs @@ -149,14 +149,17 @@ async fn a_persistent_profile_is_the_module_browser_profile() { let dir = tempfile::tempdir().unwrap(); let mut config = config_in(dir.path()); config.browser.chrome_path = Some("/usr/bin/chromium".into()); + // Built from the temp dir so it is absolute on every platform: a + // Unix-rooted literal has no drive prefix and is relative on Windows. + let profile = dir.path().join("profile").to_string_lossy().into_owned(); config.browser.profile_mode = "persistent".into(); - config.browser.profile_path = Some("/srv/teeny/state/browser/profile".into()); + config.browser.profile_path = Some(profile.clone()); let value = module_config(&config).await; assert_eq!( value["browser"], json!({ "executable": "/usr/bin/chromium", - "profile": "/srv/teeny/state/browser/profile" + "profile": profile }) ); } @@ -166,8 +169,9 @@ async fn a_persistent_profile_is_the_module_browser_profile() { #[tokio::test] async fn a_fresh_or_unusable_profile_sends_no_module_profile() { let dir = tempfile::tempdir().unwrap(); + let absolute = dir.path().join("profile").to_string_lossy().into_owned(); for (mode, path) in [ - ("fresh", Some("/srv/teeny/state/browser/profile")), + ("fresh", Some(absolute.as_str())), ("persistent", None), ("persistent", Some("relative/profile")), ] {