diff --git a/hack/e2e.go b/hack/e2e.go index 4a828d588ba..4c3cb8eef48 100644 --- a/hack/e2e.go +++ b/hack/e2e.go @@ -146,21 +146,21 @@ func main() { } } - failure := false + success := true switch { case *ctlCmd != "": ctlArgs := strings.Fields(*ctlCmd) os.Setenv("KUBE_CONFIG_FILE", "config-test.sh") - failure = !finishRunning("'kubectl "+*ctlCmd+"'", exec.Command(path.Join(versionRoot, "cluster/kubectl.sh"), ctlArgs...)) + success = finishRunning("'kubectl "+*ctlCmd+"'", exec.Command(path.Join(versionRoot, "cluster/kubectl.sh"), ctlArgs...)) case *test: - failure = Test() + success = Test() } if *down { TearDown() } - if failure { + if !success { os.Exit(1) } }