Skip to content

Commit

Permalink
spc label length check post patch
Browse files Browse the repository at this point in the history
  • Loading branch information
aamgayle committed Oct 20, 2023
1 parent 9beb7f1 commit fff6a13
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func TestIngressSecretProviderClassReconcilerIntegrationWithoutSPCLabels(t *test
spc.Namespace = ing.Namespace
spc.Labels = map[string]string{}
require.NoError(t, i.client.Patch(ctx, spc, client.Merge))
assert.Equal(t, 0, len(spc.Labels))

beforeErrCount = testutils.GetErrMetricCount(t, ingressSecretProviderControllerName)
beforeRequestCount = testutils.GetReconcileMetricCount(t, ingressSecretProviderControllerName, metrics.LabelSuccess)
Expand Down Expand Up @@ -210,8 +211,9 @@ func TestIngressSecretProviderClassReconcilerIntegrationWithoutSPCLabels(t *test
}},
},
}
assert.Equal(t, 0, len(spc.Labels))
assert.Equal(t, expected.Spec, spc.Spec)
assert.Equal(t, len(spc.Labels), 0)

// Check for idempotence
beforeErrCount = testutils.GetErrMetricCount(t, ingressSecretProviderControllerName)
beforeRequestCount = testutils.GetReconcileMetricCount(t, ingressSecretProviderControllerName, metrics.LabelSuccess)
Expand Down

0 comments on commit fff6a13

Please sign in to comment.