Use fast policy refresh interval for TestParamRef

This commit is contained in:
Joe Betz
2025-10-21 12:24:22 -04:00
committed by varshadeshmane92
parent cc6bd01063
commit 85056980d7

View File

@@ -360,6 +360,7 @@ func setupTestCommon(
matcher generic.PolicyMatcher,
shouldStartInformers bool,
) *generic.PolicyTestContext[*validating.Policy, *validating.PolicyBinding, validating.Validator] {
t.Cleanup(generic.SetPolicyRefreshIntervalForTests(10 * time.Millisecond))
testContext, testContextCancel, err := generic.NewPolicyTestContext(
t,
validating.NewValidatingAdmissionPolicyAccessor,
@@ -1508,7 +1509,6 @@ func TestParamRef(t *testing.T) {
}
t.Run(name, func(t *testing.T) {
t.Parallel()
// Test creating a policy with a cluster or namesapce-scoped param
// and binding with the provided configuration. Test will ensure
// that the provided configuration is capable of matching