The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(channels): cover bus delivery edge cases
Steven Enamakel692c116bc195
diff --git a/crates/openhuman-core/src/channels/bus/delivery_tests.rs b/crates/openhuman-core/src/channels/bus/delivery_tests.rsindex 263f33f03d..82b6204df2 100644--- a/crates/openhuman-core/src/channels/bus/delivery_tests.rs+++ b/crates/openhuman-core/src/channels/bus/delivery_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::config::test_env::EnvVarGuard;+use serde_json::json;#[test]fn outbound_body_has_stable_idempotency_key() {@@ -12,16 +12,21 @@ fn outbound_body_has_stable_idempotency_key() {}#[tokio::test]-async fn transport_captures_no_local_or_missing_hosted_credential() {- let _env_lock = crate::config::TEST_ENV_LOCK.lock().await;- let workspace = tempfile::tempdir().expect("temporary workspace");- let _workspace_env = EnvVarGuard::workspace_unlocked(workspace.path());- assert!(ManagedTransport::capture(- &crate::config::Config::default(),+async fn opening_without_a_registered_callback_answers_the_unavailable_sentinel() {+ let error = ModuleProgressiveReply::open(+ crate::config::Config::default(),"telegram".into(),- tokio_util::sync::CancellationToken::new()+ tokio_util::sync::CancellationToken::new(),)- .is_err());+ .await+ .err()+ .expect("no callback registered");+ assert!(+ error+ .to_string()+ .starts_with(crate::core::observability::BACKEND_UNAVAILABLE_PREFIX),+ "{error}"+ );}#[test]@@ -47,17 +52,3 @@ fn every_transport_operation_carries_the_channel_scoped_by_the_host() {assert_eq!(request_channel(&request), "discord:fixture");}}--#[test]-fn a_cancelled_identity_cannot_capture_a_replacement_credential() {- let session = tokio_util::sync::CancellationToken::new();- session.cancel();- let error = ManagedTransport::capture(- &crate::config::Config::default(),- "telegram".into(),- session,- )- .err()- .expect("closed identities must fail before credential reads");- assert_eq!(error.to_string(), "Channel session closed");-}