fix(test): pass JWT token and workspace_id in WS integration test

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) <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-03-25 17:00:59 +08:00
parent a5a5febdf6
commit ae6abc2fc2

View file

@ -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)