From 70f7c02bea77692921577498a3da4d16f8e8cb48 Mon Sep 17 00:00:00 2001 From: Michal Wozniak Date: Wed, 12 Jun 2024 10:34:51 +0200 Subject: [PATCH] Cleanup eviction tests to make linter happy --- pkg/registry/core/pod/storage/eviction_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/registry/core/pod/storage/eviction_test.go b/pkg/registry/core/pod/storage/eviction_test.go index d3fe5c6f140..308e3c69c46 100644 --- a/pkg/registry/core/pod/storage/eviction_test.go +++ b/pkg/registry/core/pod/storage/eviction_test.go @@ -819,7 +819,9 @@ func TestAddConditionAndDelete(t *testing.T) { } t.Cleanup(func() { zero := int64(0) - storage.Delete(testContext, newPod.Name, rest.ValidateAllObjectFunc, &metav1.DeleteOptions{GracePeriodSeconds: &zero}) + if _, _, err := storage.Delete(testContext, newPod.Name, rest.ValidateAllObjectFunc, &metav1.DeleteOptions{GracePeriodSeconds: &zero}); err != nil && !apierrors.IsNotFound(err) { + t.Fatal(err) + } }) deleteOptions = tc.makeDeleteOptions(createdObj.(*api.Pod)) } else {