summaryrefslogtreecommitdiffstats
path: root/certServiceK8sExternalProvider/main_test.go
diff options
context:
space:
mode:
authorPawel Baniewski <pawel.baniewski@nokia.com>2020-11-05 13:25:22 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-05 13:25:22 +0000
commit8ad5e5e43ba2044e7deb1b92d131ceb086c89574 (patch)
tree967a0a608f7168255adc14c0c5a1d6388de632af /certServiceK8sExternalProvider/main_test.go
parentaf2527b17fb5f5242360cd908e4cae852b1f2512 (diff)
parent5fe9e1b7c43fc1a34b38899a2a055540cc30ac81 (diff)
Merge "[OOM-K8S-CERT-EXTERNAL-PROVIDER] Change logger implementation provider"
Diffstat (limited to 'certServiceK8sExternalProvider/main_test.go')
-rw-r--r--certServiceK8sExternalProvider/main_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/certServiceK8sExternalProvider/main_test.go b/certServiceK8sExternalProvider/main_test.go
index 0ad70246..83420d6f 100644
--- a/certServiceK8sExternalProvider/main_test.go
+++ b/certServiceK8sExternalProvider/main_test.go
@@ -33,9 +33,10 @@ func Test_shouldParseArguments_defaultValues(t *testing.T) {
"first-arg-is-omitted-by-method-parse-arguments-so-this-only-a-placeholder"}
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
- metricsAddr, enableLeaderElection := parseInputArguments()
+ metricsAddr, logLevel, enableLeaderElection := parseInputArguments()
assert.Equal(t, ":8080", metricsAddr)
+ assert.Equal(t, "debug", logLevel)
assert.False(t, enableLeaderElection)
}
@@ -43,12 +44,13 @@ func Test_shouldParseArguments_valuesFromCLI(t *testing.T) {
os.Args = []string{
"first-arg-is-omitted-by-method-parse-arguments-so-this-only-a-placeholder",
"--metrics-addr=127.0.0.1:555",
+ "--log-level=error",
"--enable-leader-election=true"}
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
- metricsAddr, enableLeaderElection := parseInputArguments()
+ metricsAddr, logLevel, enableLeaderElection := parseInputArguments()
assert.Equal(t, "127.0.0.1:555", metricsAddr)
+ assert.Equal(t, "error", logLevel)
assert.True(t, enableLeaderElection)
-
}