diff --git a/integration/deploy_test.go b/integration/deploy_test.go index 085421e68a4..f6af05de9c7 100644 --- a/integration/deploy_test.go +++ b/integration/deploy_test.go @@ -128,7 +128,5 @@ func TestDeployWithInCorrectConfigWithNoStatusCheck(t *testing.T) { ns, _, deleteNs := SetupNamespace(t) defer deleteNs() - skaffold.Deploy().InDir("testdata/unstable-deployment").InNs(ns.Name).RunOrFailOutput(t) - - skaffold.Delete().InDir("testdata/unstable-deployment").InNs(ns.Name).RunOrFail(t) + skaffold.Deploy().InDir("testdata/unstable-deployment").InNs(ns.Name).RunOrFail(t) } diff --git a/integration/dev_test.go b/integration/dev_test.go index bc6b5dbc49e..0e717844a9b 100644 --- a/integration/dev_test.go +++ b/integration/dev_test.go @@ -389,7 +389,7 @@ func TestDev_WithKubecontextOverride(t *testing.T) { env := []string{fmt.Sprintf("KUBECONFIG=%s", kubeconfig)} // n.b. for the sake of this test the namespace must not be given explicitly - skaffold.Run("--kube-context", kubecontext).InDir(dir).WithEnv(env).RunOrFailOutput(t.T) + skaffold.Run("--kube-context", kubecontext).InDir(dir).WithEnv(env).RunOrFail(t.T) client.WaitForPodsReady(pods...) diff --git a/integration/diagnose_test.go b/integration/diagnose_test.go index 0612d2f59db..3221de079a9 100644 --- a/integration/diagnose_test.go +++ b/integration/diagnose_test.go @@ -43,7 +43,7 @@ func TestDiagnose(t *testing.T) { } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - skaffold.Diagnose(test.args...).InDir(test.dir).RunOrFailOutput(t) + skaffold.Diagnose(test.args...).InDir(test.dir).RunOrFail(t) }) } } diff --git a/integration/helm_test.go b/integration/helm_test.go index 7e41882b2af..658fd065c5f 100644 --- a/integration/helm_test.go +++ b/integration/helm_test.go @@ -50,7 +50,7 @@ func TestHelmDeploy(t *testing.T) { runArgs := []string{"--images", "gcr.io/k8s-skaffold/skaffold-helm"} - skaffold.Deploy(runArgs...).InDir(helmDir).InNs(ns.Name).WithEnv(env).RunOrFailOutput(t) + skaffold.Deploy(runArgs...).InDir(helmDir).InNs(ns.Name).WithEnv(env).RunOrFail(t) client.WaitForDeploymentsToStabilize(depName) diff --git a/integration/port_forward_test.go b/integration/port_forward_test.go index 098de507140..1d0d04fbee6 100644 --- a/integration/port_forward_test.go +++ b/integration/port_forward_test.go @@ -45,7 +45,7 @@ func TestPortForward(t *testing.T) { defer deleteNs() dir := "examples/microservices" - skaffold.Run().InDir(dir).InNs(ns.Name).RunOrFailOutput(t) + skaffold.Run().InDir(dir).InNs(ns.Name).RunOrFail(t) cfg, err := kubectx.CurrentConfig() if err != nil { diff --git a/integration/run_test.go b/integration/run_test.go index 685a27875c2..d2abd641ed6 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -137,7 +137,7 @@ func TestRun(t *testing.T) { ns, client, deleteNs := SetupNamespace(t) defer deleteNs() - skaffold.Run(test.args...).WithConfig(test.filename).InDir(test.dir).InNs(ns.Name).WithEnv(test.env).RunOrFailOutput(t) + skaffold.Run(test.args...).WithConfig(test.filename).InDir(test.dir).InNs(ns.Name).WithEnv(test.env).RunOrFail(t) client.WaitForPodsReady(test.pods...) client.WaitForDeploymentsToStabilize(test.deployments...) diff --git a/integration/skaffold/helper.go b/integration/skaffold/helper.go index fa2eaf778f2..6dbe9b9d8cd 100644 --- a/integration/skaffold/helper.go +++ b/integration/skaffold/helper.go @@ -154,10 +154,7 @@ func (b *RunBuilder) RunBackground(t *testing.T) context.CancelFunc { // RunOrFail runs the skaffold command and fails the test // if the command returns an error. func (b *RunBuilder) RunOrFail(t *testing.T) { - t.Helper() - if err := b.Run(t); err != nil { - t.Fatal(err) - } + b.RunOrFailOutput(t) } // Run runs the skaffold command.