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) {
|
func TestSetupSSLProxy(t *testing.T) {
|
||||||
// TODO
|
// 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -205,6 +205,10 @@ Feature backed by OpenResty Lua libraries. Requires that OCSP stapling is not en
|
||||||
dynamic certificates functionality is enabled. Please check the flags --enable-ssl-chain-completion and --enable-dynamic-configuration`)
|
dynamic certificates functionality is enabled. Please check the flags --enable-ssl-chain-completion and --enable-dynamic-configuration`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *publishSvc != "" && *publishStatusAddress != "" {
|
||||||
|
return false, nil, fmt.Errorf("Flags --publish-service and --publish-status-address are mutually exclusive")
|
||||||
|
}
|
||||||
|
|
||||||
// LuaJIT is not available on arch s390x and ppc64le
|
// LuaJIT is not available on arch s390x and ppc64le
|
||||||
disableLua := false
|
disableLua := false
|
||||||
if runtime.GOARCH == "s390x" || runtime.GOARCH == "ppc64le" {
|
if runtime.GOARCH == "s390x" || runtime.GOARCH == "ppc64le" {
|
||||||
|
|
Loading…
Reference in a new issue