We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb4a211 + 155db11 commit 739a61aCopy full SHA for 739a61a
test/e2e/framework/pod/delete.go
@@ -35,10 +35,15 @@ const (
35
PodDeleteTimeout = 5 * time.Minute
36
)
37
38
-// DeletePodOrFail deletes the pod of the specified namespace and name.
+// DeletePodOrFail deletes the pod of the specified namespace and name. Resilient to the pod
39
+// not existing.
40
func DeletePodOrFail(c clientset.Interface, ns, name string) {
41
ginkgo.By(fmt.Sprintf("Deleting pod %s in namespace %s", name, ns))
42
err := c.CoreV1().Pods(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
43
+ if err != nil && apierrors.IsNotFound(err) {
44
+ return
45
+ }
46
+
47
expectNoError(err, "failed to delete pod %s in namespace %s", name, ns)
48
}
49
0 commit comments