(t *testing.T)
| 247 | } |
| 248 | |
| 249 | func TestBadSmokeAuth(t *testing.T) { |
| 250 | ctiClient := NewCrowdsecCTIClient(WithAPIKey("asdasd"), WithHTTPClient(&http.Client{ |
| 251 | Transport: RoundTripFunc(smokeHandler), |
| 252 | })) |
| 253 | _, err := ctiClient.GetIPInfo("1.1.1.1") |
| 254 | require.EqualError(t, err, ErrUnauthorized.Error()) |
| 255 | } |
| 256 | |
| 257 | func TestSmokeInfoValidIP(t *testing.T) { |
| 258 | ctiClient := NewCrowdsecCTIClient(WithAPIKey(validApiKey), WithHTTPClient(&http.Client{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…