Flags publish-service and publish-status-address are mutually exclusive
This commit is contained in:
parent
3cf00b2fd8
commit
0971f8443f
2 changed files with 17 additions and 0 deletions
|
|
@ -62,3 +62,16 @@ func TestDefaults(t *testing.T) {
|
|||
func TestSetupSSLProxy(t *testing.T) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
func TestFlagConflict(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", "--publish-status-address", "1.1.1.1"}
|
||||
|
||||
_, _, err := parseFlags()
|
||||
if err == nil {
|
||||
t.Fatalf("Expected an error parsing flags but none returned")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue