Skip to content

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

test(startup): compare full channel and conversation refs in gateway assertions

Steven Enamakelb1c427b064c5
diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers_tests.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers_tests.rs
index ea3b927c34..ac6024be8f 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers_tests.rs
@@ -742,21 +742,24 @@ async fn hosted_target_projects_typed_media_and_voice_to_web_and_gateway_once()
== "media:tenant7/thread42/voice1"
})
);
+ let expected_channel_ref = serde_json::to_value(&channel).expect("expected channel ref");
+ let expected_conversation_ref =
+ serde_json::to_value(&conversation).expect("expected conversation ref");
assert_eq!(
- voice_gateway_wire["structured"]["channel_ref"]["accountId"],
- "trusted-account-7"
+ voice_gateway_wire["structured"]["channel_ref"],
+ expected_channel_ref
);
assert_eq!(
- voice_gateway_wire["structured"]["conversation_ref"]["threadId"],
- "topic-3"
+ voice_gateway_wire["structured"]["conversation_ref"],
+ expected_conversation_ref
);
assert_eq!(
- image_gateway_wire["structured"]["channel_ref"]["accountId"],
- "trusted-account-7"
+ image_gateway_wire["structured"]["channel_ref"],
+ expected_channel_ref
);
assert_eq!(
- image_gateway_wire["structured"]["conversation_ref"]["threadId"],
- "topic-3"
+ image_gateway_wire["structured"]["conversation_ref"],
+ expected_conversation_ref
);
assert_eq!(
gateway_terminals