Skip to content

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

test(storage): add tinyflows import tests

Steven Enamakelf9885433a300
diff --git a/crates/openhuman-core/src/storage/import/tinyflows_tests.rs b/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
index da428887ea..fc3dbbab4e 100644
--- a/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
+++ b/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
@@ -384,16 +384,26 @@ fn an_invalid_flow_record_keeps_the_import_open_for_retry() {
panic!("retry should remain incomplete without new writes: {first:?} / {retry:?}")
}
}
- assert!(legacy_flow_import_pending(&backend, &config, &Scope::local())
- .await
- .unwrap());
- assert!(!legacy_flow_import_pending(
- &backend,
- &config,
- &crate::storage::scope_for_profile("another-profile"),
- )
- .await
- .unwrap());
+ let pending = tokio::runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .unwrap()
+ .block_on(async {
+ (
+ legacy_flow_import_pending(&backend, &config, &Scope::local())
+ .await
+ .unwrap(),
+ legacy_flow_import_pending(
+ &backend,
+ &config,
+ &crate::storage::scope_for_profile("another-profile"),
+ )
+ .await
+ .unwrap(),
+ )
+ });
+ assert!(pending.0);
+ assert!(!pending.1);
assert_eq!(tree(dir.path()), before, "the legacy files were modified");
}