Cleanup Tekton tests only on success

This commit is contained in:
Martin Gencur 2021-07-08 11:38:21 +02:00
parent f545b07c96
commit 7b888925d1
1 changed files with 1 additions and 3 deletions

View File

@ -40,9 +40,6 @@ const (
func TestTektonPipeline(t *testing.T) {
it, err := test.NewKnTest()
assert.NilError(t, err)
defer func() {
assert.NilError(t, it.Teardown())
}()
kubectl := test.NewKubectl(it.Namespace())
basedir := test.CurrentDir(t) + "/../resources/tekton"
@ -89,6 +86,7 @@ func TestTektonPipeline(t *testing.T) {
r.AssertNoError(out)
assert.Assert(t, util.ContainsAll(out.Stdout, serviceName, it.Kn().Namespace()))
assert.Assert(t, util.ContainsAll(out.Stdout, "Conditions", "ConfigurationsReady", "Ready", "RoutesReady"))
assert.NilError(t, it.Teardown())
}
func waitForPipelineSuccess(k test.Kubectl) error {