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:
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func TestDeviceRegistrationFlow(t *testing.T) {
|
||||
ts, _, _, _ := setupTestServer(t)
|
||||
ts, _, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
// Step 1: Initiate device registration
|
||||
@@ -115,7 +115,7 @@ func TestDeviceRegistrationFlow(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestListDevices(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
// Login to get token
|
||||
@@ -160,7 +160,7 @@ func TestListDevices(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateDevice(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
// Login to get token
|
||||
@@ -216,7 +216,7 @@ func TestUpdateDevice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteDevice(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
// Login to get token
|
||||
@@ -258,7 +258,7 @@ func TestDeleteDevice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeviceAuthentication(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
// Create a device directly in the database
|
||||
@@ -290,7 +290,7 @@ func TestDeviceAuthentication(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestListPendingRegistrations(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -311,7 +311,7 @@ func TestListPendingRegistrations(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestApproveDeviceRegistration(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -350,7 +350,7 @@ func TestApproveDeviceRegistration(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRejectDeviceRegistration(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