Skip to content

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

test(channels): remove duplicate struct and unused helper

Steven Enamakelad06abb1edc8
diff --git a/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs b/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs
index c05e123294..43831bf0e3 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs
@@ -13,7 +13,6 @@ use tinychannels_bus::module_progressive::{
};
use tinychannels_bus::{ChannelBackendRequest, ChannelBackendResult, SendMessage};
-struct RecordingChannel {
struct RecordingChannel {
name: String,
sent: tokio::sync::Mutex<Vec<ChannelOutboundMessage>>,
@@ -68,17 +67,6 @@ impl Channel for RecordingChannel {
}
}
-fn callback_for(
- channel: Arc<RecordingChannel>,
-) -> (ChannelHostCallbacks, Arc<ChannelRuntimeContext>) {
- let mut channels = HashMap::new();
- channels.insert(
- channel.name().to_owned(),
- channel as Arc<dyn Channel>,
- );
- callback_for_channels(channels)
-}
-
fn callback_for_channels(
channels: HashMap<String, Arc<dyn Channel>>,
) -> (ChannelHostCallbacks, Arc<ChannelRuntimeContext>) {
@@ -257,7 +245,10 @@ async fn native_progressive_transport_rejects_unconfigured_account_without_provi
)))
.await;
- assert!(result.is_err(), "an unknown explicit account must fail closed");
+ assert!(
+ result.is_err(),
+ "an unknown explicit account must fail closed"
+ );
assert!(first_account.sent.lock().await.is_empty());
assert!(second_account.sent.lock().await.is_empty());
}