From ae6abc2fc2e8a1e48d45001d2b817395859f9f57 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:00:59 +0800 Subject: [PATCH] fix(test): pass JWT token and workspace_id in WS integration test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HandleWebSocket now requires auth — update test to include token and workspace_id query params in the WebSocket URL. Co-Authored-By: Claude Opus 4.6 (1M context) --- server/cmd/server/integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cmd/server/integration_test.go b/server/cmd/server/integration_test.go index 182bbf20..885748c9 100644 --- a/server/cmd/server/integration_test.go +++ b/server/cmd/server/integration_test.go @@ -710,7 +710,7 @@ func TestInvalidRequestBodies(t *testing.T) { func TestWebSocketIntegration(t *testing.T) { // Connect WebSocket client - wsURL := "ws" + strings.TrimPrefix(testServer.URL, "http") + "/ws" + wsURL := "ws" + strings.TrimPrefix(testServer.URL, "http") + "/ws?token=" + testAuthToken + "&workspace_id=" + testWorkspaceID conn, _, err := websocket.DefaultDialer.Dial(wsURL, nil) if err != nil { t.Fatalf("WebSocket connection failed: %v", err)