test: update conflicts and device 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 - Ensure test consistency across all test files
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// TestConflictsBulkOperations tests bulk conflict resolution operations
|
||||
func TestConflictsBulkOperations(t *testing.T) {
|
||||
t.Run("BulkResolveConflicts_WithoutAuth", func(t *testing.T) {
|
||||
ts, _, _, _ := setupTestServer(t)
|
||||
ts, _, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
req := map[string]interface{}{
|
||||
@@ -35,7 +35,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_EmptyConflictIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -59,7 +59,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_InvalidConflictID", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -95,7 +95,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_InvalidStrategy", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -119,7 +119,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_MostRecentStrategy", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -149,7 +149,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_HighestProgressStrategy", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -179,7 +179,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_ManualStrategy_WithoutWinner", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -208,7 +208,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_ManualStrategy_WithWinner", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -233,7 +233,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkResolveConflicts_InvalidRequestBody", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -255,7 +255,7 @@ func TestConflictsBulkOperations(t *testing.T) {
|
||||
// TestConflictsBulkDismiss tests bulk dismiss operations
|
||||
func TestConflictsBulkDismiss(t *testing.T) {
|
||||
t.Run("BulkDismissConflicts_WithoutAuth", func(t *testing.T) {
|
||||
ts, _, _, _ := setupTestServer(t)
|
||||
ts, _, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
req := map[string]interface{}{
|
||||
@@ -275,7 +275,7 @@ func TestConflictsBulkDismiss(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDismissConflicts_EmptyConflictIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -298,7 +298,7 @@ func TestConflictsBulkDismiss(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDismissConflicts_InvalidConflictID", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -333,7 +333,7 @@ func TestConflictsBulkDismiss(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDismissConflicts_MultipleConflicts", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -366,7 +366,7 @@ func TestConflictsBulkDismiss(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDismissConflicts_InvalidRequestBody", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -388,7 +388,7 @@ func TestConflictsBulkDismiss(t *testing.T) {
|
||||
// TestConflictsBulkEdgeCases tests edge cases for bulk operations
|
||||
func TestConflictsBulkEdgeCases(t *testing.T) {
|
||||
t.Run("BulkResolve_NonExistentConflicts", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -423,7 +423,7 @@ func TestConflictsBulkEdgeCases(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDismiss_MixedValidInvalid", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
|
||||
Reference in New Issue
Block a user