Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mateimicu committed Jul 18, 2022
1 parent a271ebf commit 34bebb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestQueryAllRegions(t *testing.T) {
defer os.RemoveAll(dir)
kubeconfigPath := filepath.Join(dir, "kubeconfig")

cmd := NewRootCommand("", "", "")
cmd := NewRootCommand("", "", "", "kdiscover")
buf := new(strings.Builder)
cmd.SetOut(buf)
cmd.SetErr(buf)
Expand Down
4 changes: 2 additions & 2 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Test_CascadingPersistPreRunEHackWithLoggingLevels(t *testing.T) {
defer os.RemoveAll(dir)

kubeconfigPath := filepath.Join(dir, "kubeconfig")
cmd := NewRootCommand("", "", "")
cmd := NewRootCommand("", "", "", "kdiscover")
cmd.SetOut(ioutil.Discard)
cmd.SetErr(ioutil.Discard)

Expand Down Expand Up @@ -76,7 +76,7 @@ func Test_HelpFunction(t *testing.T) {
for _, tt := range basicCommands {
testname := fmt.Sprintf("command %v", tt.cmd)
t.Run(testname, func(t *testing.T) {
cmd := NewRootCommand("", "", "")
cmd := NewRootCommand("", "", "", "kdiscover")

buf := new(strings.Builder)
cmd.SetOut(buf)
Expand Down
2 changes: 1 addition & 1 deletion cmd/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func Test_Version(t *testing.T) {
version := "mock-version"
commit := "mock-commit"
date := "mock-date"
cmd := NewRootCommand(version, commit, date)
cmd := NewRootCommand(version, commit, date, "kdisocver")
buf := new(strings.Builder)
cmd.SetOut(buf)
cmd.SetErr(buf)
Expand Down

0 comments on commit 34bebb0

Please sign in to comment.