(t *testing.T)
| 282 | } |
| 283 | |
| 284 | func TestRateLimit(t *testing.T) { |
| 285 | ctiClient := NewCrowdsecCTIClient(WithAPIKey(validApiKey), WithHTTPClient(&http.Client{ |
| 286 | Transport: RoundTripFunc(rateLimitedHandler), |
| 287 | })) |
| 288 | _, err := ctiClient.GetIPInfo("1.1.1.1") |
| 289 | require.EqualError(t, err, ErrLimit.Error()) |
| 290 | } |
| 291 | |
| 292 | func TestSearchIPs(t *testing.T) { |
| 293 | ctiClient := NewCrowdsecCTIClient(WithAPIKey(validApiKey), WithHTTPClient(&http.Client{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…