diff --git a/pkg/controller/keyvault/ingress_secret_provider_class_test.go b/pkg/controller/keyvault/ingress_secret_provider_class_test.go index d0baf6e8..b4a27da0 100644 --- a/pkg/controller/keyvault/ingress_secret_provider_class_test.go +++ b/pkg/controller/keyvault/ingress_secret_provider_class_test.go @@ -195,7 +195,9 @@ func TestIngressSecretProviderClassReconcilerIntegrationWithoutSPCLabels(t *test }, } - assert.Equal(t, 0, len(spc.Labels)) + // Prove secret class was not removed after first reconcile + require.False(t, errors.IsNotFound(c.Get(ctx, client.ObjectKeyFromObject(spc), spc))) + beforeErrCount = testutils.GetErrMetricCount(t, ingressSecretProviderControllerName) beforeRequestCount = testutils.GetReconcileMetricCount(t, ingressSecretProviderControllerName, metrics.LabelSuccess) _, err = i.Reconcile(ctx, req)