Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(storage): capture core stderr and profile contents on boot failure

Steven Enamakel10e82446d365
diff --git a/tests/storage_legacy_profile_boot_e2e.rs b/tests/storage_legacy_profile_boot_e2e.rs
index bfdb237f5f..6ad3636c56 100644
--- a/tests/storage_legacy_profile_boot_e2e.rs
+++ b/tests/storage_legacy_profile_boot_e2e.rs
@@ -48,7 +48,7 @@ fn start(home: &Path) -> (Server, String) {
.env_remove("OPENHUMAN_STORAGE_URL")
.env_remove("OPENHUMAN_MODE")
.stdout(Stdio::null())
- .stderr(Stdio::null())
+ .stderr(std::fs::File::create(home.join("core.stderr.log")).unwrap())
.spawn()
.expect("spawn the desktop core host");
let mut server = Server(server);
@@ -137,7 +137,19 @@ fn desktop_boot_reads_a_preserved_existing_v1_profile_database() {
"flow owner did not read its historical profile record: {flows}"
);
- assert!(profile.join("storage.db").is_file(), "boot migrated the active profile");
+ assert!(
+ profile.join("storage.db").is_file(),
+ "boot migrated the active profile; profile entries: {:?}; workspace entries: {:?}; logs: {}",
+ std::fs::read_dir(&profile)
+ .unwrap()
+ .map(|entry| entry.unwrap().file_name())
+ .collect::<Vec<_>>(),
+ std::fs::read_dir(profile.join("workspace"))
+ .unwrap()
+ .map(|entry| entry.unwrap().file_name())
+ .collect::<Vec<_>>(),
+ std::fs::read_to_string(home.path().join("core.stderr.log")).unwrap_or_default()
+ );
assert_eq!(
std::fs::read(&source).unwrap(),
source_bytes,