summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/command_tester.go
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-02-17 18:42:02 +0000
committerArne H Juul <arnej@yahooinc.com>2022-02-17 18:42:02 +0000
commit419ca82c28e7ea97ae7f7f1265eca158fae0844c (patch)
tree55ee9be894ad4f862ffeb12f733048451ff8c063 /client/go/cmd/command_tester.go
parentc1e701cd70e2531302a6e72d0900772f4296ab2c (diff)
parent70e50ea1b7d974ffb2e1db805e8e273eeffd6d0e (diff)
Merge branch 'master' into arnej/rename-summaryfeatures-back-to-original
Diffstat (limited to 'client/go/cmd/command_tester.go')
-rw-r--r--client/go/cmd/command_tester.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/client/go/cmd/command_tester.go b/client/go/cmd/command_tester.go
index eb55021b536..135dda895d4 100644
--- a/client/go/cmd/command_tester.go
+++ b/client/go/cmd/command_tester.go
@@ -63,9 +63,6 @@ func execute(cmd command, t *testing.T, client *mockHttpClient) (string, string)
rootCmd.Flags().VisitAll(resetFlag)
documentCmd.Flags().VisitAll(resetFlag)
- // Do not exit in tests
- exitFunc = func(code int) {}
-
// Capture stdout and execute command
var capturedOut bytes.Buffer
var capturedErr bytes.Buffer
@@ -79,7 +76,7 @@ func execute(cmd command, t *testing.T, client *mockHttpClient) (string, string)
// Execute command and return output
rootCmd.SetArgs(append(cmd.args, cmd.moreArgs...))
- rootCmd.Execute()
+ Execute()
return capturedOut.String(), capturedErr.String()
}