Skip to content

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

test(credentials): cover logout cleanup without voice listeners

Steven Enamakelfb739b084626
diff --git a/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs b/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs
index 03511d1698..836cd4f6be 100644
--- a/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs
+++ b/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs
@@ -499,7 +499,6 @@ async fn start_credential_gated_services_completes_with_all_services_disabled()
// exercises the concurrent spawn/await machinery (the changed code) without
// touching the mic, a model, the screen, or the network.
config.local_ai.runtime_enabled = false;
- config.voice_server.auto_start = false;
// Bound the wait so a serial-blocking regression (or a hung join) fails the
// test instead of hanging CI. Every service no-ops, so this resolves almost
@@ -511,3 +510,17 @@ async fn start_credential_gated_services_completes_with_all_services_disabled()
.await
.expect("start_credential_gated_services must return, not block");
}
+
+#[tokio::test]
+async fn logout_stops_remaining_services_without_voice_listeners() {
+ let tmp = TempDir::new().expect("private workspace");
+ let config = test_config(&tmp);
+ let ctx = DispatchCtx::default();
+
+ tokio::time::timeout(
+ std::time::Duration::from_secs(5),
+ stop_credential_gated_services(&ctx, &config),
+ )
+ .await
+ .expect("logout cleanup must finish when no voice listener exists");
+}