summaryrefslogtreecommitdiffstats
path: root/certServiceK8sExternalProvider/main_test.go
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2020-10-30 17:06:04 +0100
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2020-11-05 13:53:05 +0100
commit5fe9e1b7c43fc1a34b38899a2a055540cc30ac81 (patch)
tree5a83d0219fa03f0d280db61ed44f64d377a04138 /certServiceK8sExternalProvider/main_test.go
parent15446c2ccfc117a0feb5a5249c2e62714b2cd3d7 (diff)
[OOM-K8S-CERT-EXTERNAL-PROVIDER] Change logger implementation provider
Issue-ID: OOM-2559 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com> Change-Id: I717dfcfd74a01ccb81b2eb03c52be2c90fc3a9c5
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)
-
}