Skip to content

Commit 63655f4

Browse files
authored
Merge pull request kubernetes#125460 from mimowo/make-linter-happy
Cleanup eviction tests to make linter happy
2 parents cf0b457 + 70f7c02 commit 63655f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/registry/core/pod/storage/eviction_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,9 @@ func TestAddConditionAndDelete(t *testing.T) {
819819
}
820820
t.Cleanup(func() {
821821
zero := int64(0)
822-
storage.Delete(testContext, newPod.Name, rest.ValidateAllObjectFunc, &metav1.DeleteOptions{GracePeriodSeconds: &zero})
822+
if _, _, err := storage.Delete(testContext, newPod.Name, rest.ValidateAllObjectFunc, &metav1.DeleteOptions{GracePeriodSeconds: &zero}); err != nil && !apierrors.IsNotFound(err) {
823+
t.Fatal(err)
824+
}
823825
})
824826
deleteOptions = tc.makeDeleteOptions(createdObj.(*api.Pod))
825827
} else {

0 commit comments

Comments
 (0)