Skip to content

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

test(import): simplify existing-record overwrite test setup

Steven Enamakel10822d4ef115
diff --git a/crates/openhuman-core/src/storage/import/tinyflows_tests.rs b/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
index 0ff4d5d249..6a64c43d8c 100644
--- a/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
+++ b/crates/openhuman-core/src/storage/import/tinyflows_tests.rs
@@ -289,17 +289,8 @@ fn a_record_the_backend_already_holds_is_never_overwritten() {
let (_dir, config) = workspace();
let backend = backend();
let catalog = FlowCatalogDocuments::new(documents(&backend, &Scope::local()));
- let mut flow = {
- let catalog = catalog.clone();
- crate::storage::block_on_anyhow(async move {
- // Imported once to learn the legacy flow, then replaced.
- Ok(catalog.get_flow("flow-alpha").await?)
- })
- .unwrap()
- };
- assert!(flow.is_none());
import_flows(&backend, &Scope::local(), &config).unwrap();
- flow = {
+ let flow = {
let catalog = catalog.clone();
crate::storage::block_on_anyhow(async move { Ok(catalog.get_flow("flow-alpha").await?) })
.unwrap()