summaryrefslogtreecommitdiffstats
path: root/internal/handler/websocket/handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handler/websocket/handler_test.go')
-rw-r--r--internal/handler/websocket/handler_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/handler/websocket/handler_test.go b/internal/handler/websocket/handler_test.go
index 10405b2..604a190 100644
--- a/internal/handler/websocket/handler_test.go
+++ b/internal/handler/websocket/handler_test.go
@@ -305,6 +305,13 @@ func TestAuthRequired(t *testing.T) {
305 t.Errorf("Expected OK true after auth, got false: %v", msg3[3]) 305 t.Errorf("Expected OK true after auth, got false: %v", msg3[3])
306 } 306 }
307 t.Logf("Publish succeeded after auth") 307 t.Logf("Publish succeeded after auth")
308
309 // Verify authorized requests are tracked in metrics
310 authorizedCount := ts.metrics.getRequestCount("EVENT", "authorized")
311 if authorizedCount == 0 {
312 t.Errorf("Expected authorized requests to be tracked in metrics, got 0")
313 }
314 t.Logf("Metrics: %d authorized requests tracked", authorizedCount)
308} 315}
309 316
310// TestAuthNotInAllowlist verifies that pubkeys not in allowlist are rejected 317// TestAuthNotInAllowlist verifies that pubkeys not in allowlist are rejected