diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go index cc8ee5ccbe4..21fb787bb3f 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go @@ -1646,14 +1646,14 @@ func testParamRefCase(t *testing.T, paramIsClusterScoped, nameIsSet, namespaceIs newClusterScopedParam(matchingParamName+"5", otherNonmatchingLabels), } - require.NoError(t, testContext.UpdateAndWait(&policy, &binding)) - for _, p := range params { // Don't wait for these sync the informers would not have been // created unless bound to a policy require.NoError(t, testContext.Update(p)) } + require.NoError(t, testContext.UpdateAndWait(&policy, &binding)) + namespacedRequestObject := newParam("some param", nonMatchingNamespace, nil) clusterScopedRequestObject := newClusterScopedParam("other param", nil)