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: add missing test files for notification bus and store modules
Steven Enamakel8ec6aff4ffd8
diff --git a/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs b/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rsindex f31e764451..60f9904e58 100644--- a/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs+++ b/crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs@@ -41,39 +41,6 @@ fn cron_failed_uses_failure_title() {assert_eq!(n.title, "Cron job failed");}-#[test]-fn successful_webhook_is_silent() {- let ev = DomainEvent::WebhookProcessed {- tunnel_id: "t".into(),- skill_id: "s".into(),- method: "POST".into(),- path: "/p".into(),- correlation_id: "c".into(),- status_code: 200,- elapsed_ms: 5,- error: None,- };- assert!(event_to_notification(&ev).is_none());-}--#[test]-fn failed_webhook_produces_system_notification() {- let ev = DomainEvent::WebhookProcessed {- tunnel_id: "t".into(),- skill_id: "skill-x".into(),- method: "POST".into(),- path: "/p".into(),- correlation_id: "c".into(),- status_code: 500,- elapsed_ms: 12,- error: Some("boom".into()),- };- let n = event_to_notification(&ev).unwrap();- assert_eq!(n.category, CoreNotificationCategory::System);- assert!(n.body.contains("skill-x"));- assert!(n.body.contains("boom"));-}-#[test]fn subagent_completed_produces_agents_notification() {let ev = DomainEvent::SubagentCompleted {diff --git a/crates/openhuman-core/src/desktop/notifications/store_tests_2_tests.rs b/crates/openhuman-core/src/desktop/notifications/store_tests_2_tests.rsindex 3f37fa89eb..db99f53eb3 100644--- a/crates/openhuman-core/src/desktop/notifications/store_tests_2_tests.rs+++ b/crates/openhuman-core/src/desktop/notifications/store_tests_2_tests.rs@@ -79,30 +79,6 @@ fn provider_filter_works() {assert_eq!(gmail[0].provider, "gmail");}-#[test]-fn insert_if_not_recent_skips_duplicate() {- let dir = TempDir::new().unwrap();- let config = test_config(&dir);- let n = sample_notification("dup-a", "slack");- assert!(insert_if_not_recent(&config, &n).unwrap());-- let n2 = sample_notification("dup-b", "slack");- assert!(!insert_if_not_recent(&config, &n2).unwrap());-}--#[test]-fn insert_if_not_recent_rejects_expired_window_only() {- let dir = TempDir::new().unwrap();- let config = test_config(&dir);-- let mut old = sample_notification("old1", "slack");- old.received_at = Utc::now() - chrono::Duration::seconds(120);- insert(&config, &old).unwrap();-- let fresh_same_content = sample_notification("fresh1", "slack");- assert!(insert_if_not_recent(&config, &fresh_same_content).unwrap());-}-#[test]fn insert_if_not_recent_is_atomic_under_concurrent_calls() {let dir = TempDir::new().unwrap();@@ -131,17 +107,6 @@ fn insert_if_not_recent_is_atomic_under_concurrent_calls() {assert_eq!(items.len(), 1);}-#[test]-fn exists_recent_rejects_expired_notification() {- let dir = TempDir::new().unwrap();- let config = test_config(&dir);- let mut n = sample_notification("old1", "slack");- n.received_at = Utc::now() - chrono::Duration::seconds(120);- insert(&config, &n).unwrap();-- assert!(!exists_recent(&config, "slack", None, "Test notification", "Test body").unwrap());-}-#[test]fn settings_roundtrip_defaults_and_upsert() {let dir = TempDir::new().unwrap();@@ -170,37 +135,6 @@ fn settings_roundtrip_defaults_and_upsert() {assert!(!updated.route_to_orchestrator);}-#[test]-fn exists_recent_detects_with_and_without_account_id() {- let dir = TempDir::new().unwrap();- let config = test_config(&dir);-- let mut n = sample_notification("acct-1", "slack");- n.account_id = Some("acct-main".to_string());- insert(&config, &n).unwrap();-- assert!(exists_recent(- &config,- "slack",- Some("acct-main"),- "Test notification",- "Test body"- )- .unwrap());- assert!(!exists_recent(- &config,- "slack",- Some("acct-other"),- "Test notification",- "Test body"- )- .unwrap());-- let n_null = sample_notification("acct-null", "slack");- insert(&config, &n_null).unwrap();- assert!(exists_recent(&config, "slack", None, "Test notification", "Test body").unwrap());-}-#[test]fn mark_dismissed_and_mark_acted_report_match_and_update_status() {let dir = TempDir::new().unwrap();