Skip to content

Commit ac45e51

Browse files
Update kueue-managed labels in VAP tests
1 parent 52aa6e6 commit ac45e51

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/odh/validating_admission_policy_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,27 +228,27 @@ func TestValidatingAdmissionPolicy(t *testing.T) {
228228
})
229229

230230
/**************************************************************************
231-
Testing the 2nd alternative behavior which targets specific namespaces that have the 'kueue-managed' label
231+
Testing the 2nd alternative behavior which targets specific namespaces that have the 'kueue.openshift.io/managed' label
232232
**************************************************************************/
233233
t.Run("Custom ValidatingAdmissionPolicyBinding", func(t *testing.T) {
234-
// Update the test namespace with the new 'kueue-managed' label
234+
// Update the test namespace with the new 'kueue.openshift.io/managed' label
235235
ns, err = test.Client().Core().CoreV1().Namespaces().Get(test.Ctx(), ns.Name, metav1.GetOptions{})
236236
if ns.Labels == nil {
237237
ns.Labels = map[string]string{}
238238
}
239-
ns.Labels["kueue-managed"] = "true"
239+
ns.Labels["kueue.openshift.io/managed"] = "true"
240240
_, err = test.Client().Core().CoreV1().Namespaces().Update(test.Ctx(), ns, metav1.UpdateOptions{})
241241
test.Eventually(func() bool {
242242
ns, _ = test.Client().Core().CoreV1().Namespaces().Get(test.Ctx(), ns.Name, metav1.GetOptions{})
243-
return ns.Labels["kueue-managed"] == "true"
243+
return ns.Labels["kueue.openshift.io/managed"] == "true"
244244
}).WithTimeout(10 * time.Second).WithPolling(500 * time.Millisecond).Should(BeTrue())
245245
test.Expect(err).ToNot(HaveOccurred())
246246

247-
// Apply the ValidatingAdmissionPolicyBinding targetting namespaces with the label 'kueue-managed'
247+
// Apply the ValidatingAdmissionPolicyBinding targetting namespaces with the label 'kueue.openshift.io/managed'
248248
vapb, err = test.Client().Core().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Get(test.Ctx(), vapb.Name, metav1.GetOptions{})
249249
test.Expect(err).ToNot(HaveOccurred())
250250

251-
vapb.Spec.MatchResources.NamespaceSelector.MatchLabels = map[string]string{"kueue-managed": "true"}
251+
vapb.Spec.MatchResources.NamespaceSelector.MatchLabels = map[string]string{"kueue.openshift.io/managed": "true"}
252252
_, err = test.Client().Core().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Update(test.Ctx(), vapb, metav1.UpdateOptions{})
253253
test.Expect(err).ToNot(HaveOccurred())
254254
defer revertVAPB(test, vapbCopy)

0 commit comments

Comments
 (0)