Skip to content

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

test(orchestration): return owned values from response field helper

Steven Enamakel931815bda97a
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
index a5eda8dda1..3fcf581f36 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
@@ -218,8 +218,9 @@ async fn cancelling_a_paused_driver_through_rpc_settles_once_with_its_reason() {
.get("data")
.and_then(|data| data.get(name))
.or_else(|| value.get(name))
+ .cloned()
};
- assert_eq!(response_field(&cancelled, "cancelled"), Some(&json!(true)));
+ assert_eq!(response_field(&cancelled, "cancelled"), Some(json!(true)));
assert_eq!(provider.calls.load(std::sync::atomic::Ordering::SeqCst), 1);
assert!(matches!(
jobs.get(paused_job.id.as_str())
@@ -249,10 +250,10 @@ async fn cancelling_a_paused_driver_through_rpc_settles_once_with_its_reason() {
let repeated = (controller.handler)(DispatchCtx::new(Arc::clone(&core)), repeated_params)
.await
.expect("repeated cancel RPC result");
- assert_eq!(response_field(&repeated, "cancelled"), Some(&json!(false)));
+ assert_eq!(response_field(&repeated, "cancelled"), Some(json!(false)));
assert_eq!(
response_field(&repeated, "outcome"),
- Some(&json!("unknown"))
+ Some(json!("unknown"))
);
forget_workspace_for_test(workspace.path());
assert!(!parent_cancellation.is_cancelled());