Exclude some tests cases in CI

This commit is contained in:
Daniel
2022-02-02 13:34:42 +01:00
parent 60d8664e7b
commit ef62be4cb0
2 changed files with 42 additions and 30 deletions

View File

@@ -6,6 +6,10 @@ import (
)
func TestLocationLookup(t *testing.T) {
// Skip in CI.
if testing.Short() {
t.Skip()
}
t.Parallel()
ip1 := net.ParseIP("81.2.69.142")

View File

@@ -352,6 +352,9 @@ func TestEndpointMatching(t *testing.T) { //nolint:maintidx // TODO
IP: net.ParseIP("10.2.4.4"),
}).Init(), NoMatch)
// Skip test that need the geoip database in CI.
if !testing.Short() {
// ASN
ep, err = parseEndpoint("+ AS15169")
@@ -382,6 +385,8 @@ func TestEndpointMatching(t *testing.T) { //nolint:maintidx // TODO
entity.SetIP(net.ParseIP("151.101.1.164")) // nytimes.com
testEndpointMatch(t, ep, entity, NoMatch)
}
// Scope
ep, err = parseEndpoint("+ Localhost,LAN")
@@ -397,10 +402,13 @@ func TestEndpointMatching(t *testing.T) { //nolint:maintidx // TODO
// Lists
// Skip test that need the filter lists in CI.
if !testing.Short() {
_, err = parseEndpoint("+ L:A,B,C")
if err != nil {
t.Fatal(err)
}
}
// TODO: write test for lists matcher
}