You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eventually(crpStatusUpdatedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to update cluster resource placement status as expected")
69
-
})
70
-
71
-
It("should place resources on the all available member clusters", checkIfPlacedWorkResourcesOnAllMemberClusters)
Eventually(crpEvictionStatusUpdatedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to update cluster resource placement eviction status as expected")
92
-
})
93
-
94
-
It("should ensure cluster resource placement status is unchanged", func() {
Eventually(crpStatusUpdatedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to update cluster resource placement status as expected")
97
-
})
98
-
99
-
It("should still place resources on the all available member clusters", checkIfPlacedWorkResourcesOnAllMemberClusters)
100
-
})
101
-
102
34
var_=Describe("ClusterResourcePlacement eviction of bound binding, taint cluster before eviction - No PDB specified", Ordered, Serial, func() {
By(fmt.Sprintf("expecting denial of CREATE eviction %s", crpeName))
1315
+
err:=hubClient.Create(ctx, crpe)
1316
+
varstatusErr*k8sErrors.StatusError
1317
+
Expect(errors.As(err, &statusErr)).To(BeTrue(), fmt.Sprintf("Create CRPE call produced error %s. Error type wanted is %s.", reflect.TypeOf(err), reflect.TypeOf(&k8sErrors.StatusError{})))
1318
+
Expect(statusErr.Status().Message).Should(ContainSubstring(fmt.Sprintf("ClusterResourcePlacement.placement.kubernetes-fleet.io \"%s\" not found", crpName)))
1319
+
})
1320
+
1321
+
It("should deny create on CRPE with deleting crp", func() {
By(fmt.Sprintf("expecting denial of CREATE eviction %s", crpeName))
1349
+
err:=hubClient.Create(ctx, crpe)
1350
+
varstatusErr*k8sErrors.StatusError
1351
+
Expect(errors.As(err, &statusErr)).To(BeTrue(), fmt.Sprintf("Create CRPE call produced error %s. Error type wanted is %s.", reflect.TypeOf(err), reflect.TypeOf(&k8sErrors.StatusError{})))
1352
+
Expect(statusErr.Status().Message).Should(MatchRegexp(fmt.Sprintf("cluster resource placement %s is being deleted", crpName)))
1353
+
})
1354
+
1355
+
It("should deny create on CRPE with PickFixed crp", func() {
By(fmt.Sprintf("expecting denial of CREATE eviction %s", crpName))
1380
+
err:=hubClient.Create(ctx, crpe)
1381
+
varstatusErr*k8sErrors.StatusError
1382
+
Expect(errors.As(err, &statusErr)).To(BeTrue(), fmt.Sprintf("Create CRPE call produced error %s. Error type wanted is %s.", reflect.TypeOf(err), reflect.TypeOf(&k8sErrors.StatusError{})))
1383
+
Expect(statusErr.Status().Message).Should(MatchRegexp("cluster resource placement policy type PickFixed is not supported"))
0 commit comments