aboutsummaryrefslogtreecommitdiffstats
path: root/certServiceK8sExternalProvider/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'certServiceK8sExternalProvider/main_test.go')
-rw-r--r--certServiceK8sExternalProvider/main_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/certServiceK8sExternalProvider/main_test.go b/certServiceK8sExternalProvider/main_test.go
index d74fe0d3..0ad70246 100644
--- a/certServiceK8sExternalProvider/main_test.go
+++ b/certServiceK8sExternalProvider/main_test.go
@@ -21,14 +21,15 @@
package main
import (
+ "flag"
"os"
"testing"
+
"github.com/stretchr/testify/assert"
- "flag"
)
func Test_shouldParseArguments_defaultValues(t *testing.T) {
- os.Args = []string {
+ os.Args = []string{
"first-arg-is-omitted-by-method-parse-arguments-so-this-only-a-placeholder"}
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
@@ -39,10 +40,10 @@ func Test_shouldParseArguments_defaultValues(t *testing.T) {
}
func Test_shouldParseArguments_valuesFromCLI(t *testing.T) {
- os.Args = []string {
+ os.Args = []string{
"first-arg-is-omitted-by-method-parse-arguments-so-this-only-a-placeholder",
"--metrics-addr=127.0.0.1:555",
- "--enable-leader-election=true" }
+ "--enable-leader-election=true"}
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
metricsAddr, enableLeaderElection := parseInputArguments()