(t *testing.T)
| 371 | } |
| 372 | |
| 373 | func TestAuthManager_ClearToken(t *testing.T) { |
| 374 | httpClient := &HTTPClient{baseURL: "https://test.example.com"} |
| 375 | logger := testutils.NewTestLogger() |
| 376 | |
| 377 | authManager := NewAuthManagerWithPassword(httpClient, "user", "pass", logger) |
| 378 | |
| 379 | // Set a token |
| 380 | authManager.authToken = &AuthToken{ |
| 381 | Ticket: "test-ticket", |
| 382 | ExpiresAt: time.Now().Add(1 * time.Hour), |
| 383 | } |
| 384 | |
| 385 | // Clear the token |
| 386 | authManager.ClearToken() |
| 387 | |
| 388 | assert.Nil(t, authManager.authToken) |
| 389 | } |
| 390 | |
| 391 | func TestAuthManager_ConcurrentAccess(t *testing.T) { |
| 392 | // Create a test server that simulates slow authentication |
nothing calls this directly
no test coverage detected