(t *testing.T)
| 365 | } |
| 366 | |
| 367 | func TestHTTPClient_NetworkError(t *testing.T) { |
| 368 | // Use invalid URL to simulate network error |
| 369 | client := NewHTTPClient(&http.Client{Timeout: 1 * time.Second}, "http://invalid-host.local", testutils.NewTestLogger()) |
| 370 | |
| 371 | var result map[string]interface{} |
| 372 | err := client.Get(context.Background(), "/test", &result) |
| 373 | |
| 374 | require.Error(t, err) |
| 375 | assert.Contains(t, err.Error(), "request failed") |
| 376 | } |
| 377 | |
| 378 | func TestHTTPClient_ContextCancellation(t *testing.T) { |
| 379 | // Create server that delays response to test context cancellation |
nothing calls this directly
no test coverage detected