test: update websocket test signatures

- Remove handler parameter from test function calls
- Update test signatures to match new setupTestServer return values
- Fix compilation errors after test helper refactoring
- Maintain websocket test functionality
This commit is contained in:
2026-02-06 17:07:52 -05:00
parent 7381d9178b
commit 327be1af63
+6 -6
View File
@@ -20,7 +20,7 @@ import (
// TestWebSocketConnection tests basic WebSocket connection and authentication
func TestWebSocketConnection(t *testing.T) {
// Setup test server with WebSocket
ts, queries, _, _ := setupTestServer(t)
ts, queries, _ := setupTestServer(t)
defer ts.Close()
// Get JWT token for a test user
@@ -51,7 +51,7 @@ func TestWebSocketConnection(t *testing.T) {
// TestWebSocketDeviceAuth tests device authentication via WebSocket
func TestWebSocketDeviceAuth(t *testing.T) {
ts, queries, _, _ := setupTestServer(t)
ts, queries, _ := setupTestServer(t)
defer ts.Close()
// Create a test device
@@ -85,7 +85,7 @@ func TestWebSocketDeviceAuth(t *testing.T) {
// TestWebSocketProgressBroadcast tests that progress updates are broadcast to connected clients
func TestWebSocketProgressBroadcast(t *testing.T) {
ts, queries, _, _ := setupTestServer(t)
ts, queries, _ := setupTestServer(t)
defer ts.Close()
// Get JWT token
@@ -148,7 +148,7 @@ func TestWebSocketProgressBroadcast(t *testing.T) {
// TestWebSocketPingPong tests that ping/pong messages work correctly
func TestWebSocketPingPong(t *testing.T) {
ts, queries, _, _ := setupTestServer(t)
ts, queries, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, queries)
@@ -181,7 +181,7 @@ func TestWebSocketPingPong(t *testing.T) {
// TestWebSocketConnectionLimit tests that the server handles multiple connections
func TestWebSocketConnectionLimit(t *testing.T) {
ts, queries, _, _ := setupTestServer(t)
ts, queries, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, queries)
@@ -207,7 +207,7 @@ func TestWebSocketConnectionLimit(t *testing.T) {
// TestWebSocketInvalidToken tests that invalid tokens are rejected
func TestWebSocketInvalidToken(t *testing.T) {
ts, _, _, _ := setupTestServer(t)
ts, _, _ := setupTestServer(t)
defer ts.Close()
// Try to connect with invalid token