diff --git a/pkg/util/k8sutil/errors_test.go b/pkg/util/k8sutil/errors_test.go index 5353cd7b4..7b6dcf1b5 100644 --- a/pkg/util/k8sutil/errors_test.go +++ b/pkg/util/k8sutil/errors_test.go @@ -20,15 +20,21 @@ var ( func TestIsAlreadyExists(t *testing.T) { assert.False(t, IsAlreadyExists(conflictError)) + assert.False(t, IsConflict(maskAny(invalidError))) assert.True(t, IsAlreadyExists(existsError)) + assert.True(t, IsAlreadyExists(maskAny(existsError))) } func TestIsConflict(t *testing.T) { assert.False(t, IsConflict(existsError)) + assert.False(t, IsConflict(maskAny(invalidError))) assert.True(t, IsConflict(conflictError)) + assert.True(t, IsConflict(maskAny(conflictError))) } func TestIsNotFound(t *testing.T) { assert.False(t, IsNotFound(invalidError)) + assert.False(t, IsConflict(maskAny(invalidError))) assert.True(t, IsNotFound(notFoundError)) + assert.True(t, IsNotFound(maskAny(notFoundError))) }