Add Maxmind Editions support

This commit is contained in:
Maxim Pogozhiy 2020-03-16 14:26:33 +07:00
parent 130af33510
commit 78576a9bbc
7 changed files with 110 additions and 30 deletions

View file

@ -75,3 +75,16 @@ func TestFlagConflict(t *testing.T) {
t.Fatalf("Expected an error parsing flags but none returned")
}
}
func TestMaxmindEdition(t *testing.T) {
resetForTesting(func() { t.Fatal("Parsing failed") })
oldArgs := os.Args
defer func() { os.Args = oldArgs }()
os.Args = []string{"cmd", "--publish-service", "namespace/test", "--http-port", "0", "--https-port", "0", "--maxmind-license-key", "0000000", "--maxmind-edition-ids", "GeoLite2-City, TestCheck"}
_, _, err := parseFlags()
if err == nil {
t.Fatalf("Expected an error parsing flags but none returned")
}
}