Skip to content

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

test(flows): update assertions in flow lifecycle tests

Steven Enamakel0c6fd238ada3
diff --git a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
index ffbd5b55bd..eb6279fe3d 100644
--- a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
@@ -65,7 +65,10 @@ async fn flows_resume_rejects_a_stale_graph_and_settles_the_parked_run() {
Some("workflow graph changed after the run parked; refusing resume")
);
assert!(
- !after_run.steps.iter().any(|step| step.node_id == "downstream"),
+ !after_run
+ .steps
+ .iter()
+ .any(|step| step.node_id == "downstream"),
"the stale approval must not execute the replacement graph: {after_run:?}"
);
let after_flow = flows_get(&config, &flow.id).await.unwrap().value;
diff --git a/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs b/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs
index 6cb7fb32d2..de572a6d52 100644
--- a/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs
@@ -604,10 +604,7 @@ async fn flows_cancel_run_cancels_a_parked_pending_approval_run() {
let run_row = flows_get_run(&config, &thread_id).await.unwrap();
assert_eq!(run_row.value.status, "cancelled");
assert!(run_row.value.pending_approvals.is_empty());
- assert_eq!(
- run_row.value.error.as_deref(),
- Some("parked run cancelled")
- );
+ assert_eq!(run_row.value.error.as_deref(), Some("parked run cancelled"));
let reloaded = flows_get(&config, &created.value.id).await.unwrap();
assert_eq!(reloaded.value.last_status.as_deref(), Some("cancelled"));
diff --git a/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs b/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs
index c3ff9e6e9b..c6bafd7550 100644
--- a/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs
@@ -570,7 +570,10 @@ async fn flows_resume_refuses_when_the_graph_changed_after_park() {
)
.await
.expect_err("resume must refuse once the graph changed after park");
- assert!(error.contains("workflow graph changed after the run parked"), "{error}");
+ assert!(
+ error.contains("workflow graph changed after the run parked"),
+ "{error}"
+ );
// Must NOT have executed: the engine must never have run, so "downstream"
// must not appear among the run's persisted steps.