Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1745 from mlavacca/cleanup-not-fou…
Browse files Browse the repository at this point in the history
…nd-error

chore: cleanup err check in conformance tests
  • Loading branch information
k8s-ci-robot authored and shaneutt committed Mar 14, 2023
1 parent e45b4f0 commit 4fa8fc5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conformance/utils/kubernetes/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ func (a Applier) MustApplyWithCleanup(t *testing.T, c client.Client, timeoutConf
defer cancel()
t.Logf("Deleting %s %s", uObj.GetName(), uObj.GetKind())
err = c.Delete(ctx, uObj)
require.NoErrorf(t, err, "error deleting resource")
if !apierrors.IsNotFound(err) {
require.NoErrorf(t, err, "error deleting resource")
}
})
}
continue
Expand All @@ -234,7 +236,9 @@ func (a Applier) MustApplyWithCleanup(t *testing.T, c client.Client, timeoutConf
defer cancel()
t.Logf("Deleting %s %s", uObj.GetName(), uObj.GetKind())
err = c.Delete(ctx, uObj)
require.NoErrorf(t, err, "error deleting resource")
if !apierrors.IsNotFound(err) {
require.NoErrorf(t, err, "error deleting resource")
}
})
}
require.NoErrorf(t, err, "error updating resource")
Expand Down

0 comments on commit 4fa8fc5

Please sign in to comment.