Skip to content

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

test(storage): capture table counts before asserting idempotent import

Steven Enamakelb1bfcbbbbe13
diff --git a/crates/openhuman-core/src/storage/layout/legacy_tests.rs b/crates/openhuman-core/src/storage/layout/legacy_tests.rs
index e4bdcb8a30..628c27137a 100644
--- a/crates/openhuman-core/src/storage/layout/legacy_tests.rs
+++ b/crates/openhuman-core/src/storage/layout/legacy_tests.rs
@@ -36,8 +36,14 @@ async fn importing_twice_changes_nothing() {
.await
.unwrap_or_else(|error| panic!("second legacy import failed: {error:#?}"));
migrate(&fx.target).await.unwrap();
+ let second = super::super::db::table_counts(&v1_db(&fx.target)).unwrap();
+ std::fs::write(
+ "/home/ubuntu/work/workflow-openhuman/openhuman/worktrees/test-to-green-followup-8368/ci-out/nextest/legacy-counts.txt",
+ format!("first: {first:#?}\nsecond: {second:#?}"),
+ )
+ .unwrap();
assert_eq!(
- super::super::db::table_counts(&v1_db(&fx.target)).unwrap(),
+ second,
first
);
}