From 8df14402d2cf076c715fa95e75f58fd53d853ed2 Mon Sep 17 00:00:00 2001 From: argenis de la rosa Date: Tue, 17 Mar 2026 11:10:55 -0400 Subject: [PATCH] fix(gateway): add new fields to test AppState and GatewayConfig constructors Add device_registry, pending_pairings to test AppState instances and pairing_dashboard to test GatewayConfig to fix compilation of tests after the new pairing dashboard fields were introduced. Co-Authored-By: Claude Opus 4.6 --- src/config/schema.rs | 1 + src/gateway/mod.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/config/schema.rs b/src/config/schema.rs index 9266e2624..6af562000 100644 --- a/src/config/schema.rs +++ b/src/config/schema.rs @@ -9455,6 +9455,7 @@ channel_id = "C123" idempotency_max_keys: 4096, session_persistence: true, session_ttl_hours: 0, + pairing_dashboard: PairingDashboardConfig::default(), }; let toml_str = toml::to_string(&g).unwrap(); let parsed: GatewayConfig = toml::from_str(&toml_str).unwrap(); diff --git a/src/gateway/mod.rs b/src/gateway/mod.rs index 850424f9f..2422e5434 100644 --- a/src/gateway/mod.rs +++ b/src/gateway/mod.rs @@ -1891,6 +1891,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let response = handle_metrics(State(state)).await.into_response(); @@ -1944,6 +1946,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let response = handle_metrics(State(state)).await.into_response(); @@ -2321,6 +2325,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let mut headers = HeaderMap::new(); @@ -2388,6 +2394,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let headers = HeaderMap::new(); @@ -2467,6 +2475,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let response = handle_webhook( @@ -2518,6 +2528,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let mut headers = HeaderMap::new(); @@ -2574,6 +2586,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let mut headers = HeaderMap::new(); @@ -2635,6 +2649,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let response = Box::pin(handle_nextcloud_talk_webhook( @@ -2692,6 +2708,8 @@ mod tests { shutdown_tx: tokio::sync::watch::channel(false).0, node_registry: Arc::new(nodes::NodeRegistry::new(16)), session_backend: None, + device_registry: None, + pending_pairings: None, }; let mut headers = HeaderMap::new();