(t *testing.T)
| 269 | } |
| 270 | |
| 271 | func TestSmokeUnknownIP(t *testing.T) { |
| 272 | ctiClient := NewCrowdsecCTIClient(WithAPIKey(validApiKey), WithHTTPClient(&http.Client{ |
| 273 | Transport: RoundTripFunc(smokeHandler), |
| 274 | })) |
| 275 | |
| 276 | resp, err := ctiClient.GetIPInfo("42.42.42.42") |
| 277 | if err != nil { |
| 278 | t.Fatalf("failed to get ip info: %s", err) |
| 279 | } |
| 280 | |
| 281 | assert.Empty(t, resp.Ip) |
| 282 | } |
| 283 | |
| 284 | func TestRateLimit(t *testing.T) { |
| 285 | ctiClient := NewCrowdsecCTIClient(WithAPIKey(validApiKey), WithHTTPClient(&http.Client{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…