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(workNamespacePlacedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to place namespace on member cluster %s", memberCluster.ClusterName)
547
+
548
+
// Verify configMap is NOT placed (NamespaceOnly should not include resources within namespace)
Consistently(nameSpaceResourceNotPlacedActual, consistentlyDuration, consistentlyInterval).Should(Succeed(), "Namespace resource (ConfigMap) should not be placed with NamespaceOnly selection on member cluster %s", memberCluster.ClusterName)
551
+
}
552
+
})
553
+
554
+
It("Create the ResourcePlacement that selects the ResourceEnvelope", func() {
555
+
rp:=&placementv1beta1.ResourcePlacement{
556
+
ObjectMeta: metav1.ObjectMeta{
557
+
Name: rpName,
558
+
Namespace: workNamespaceName,
559
+
// Add a custom finalizer; this would allow us to better observe
Eventually(rpStatusUpdatedActual(rpSelectedResources, allMemberClusterNames, nil, "0"), eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to update ResourcePlacement status as expected")
594
+
})
595
+
596
+
It("should place the enveloped resources on all member clusters", func() {
Eventually(workResourcesPlacedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to place enveloped resources on member cluster %s", memberCluster.ClusterName)
601
+
}
602
+
})
603
+
604
+
It("should not placed the configMap on any clusters as its not selected", func() {
605
+
// Verify that all resources placed have been removed from specified member clusters.
Eventually(configMapNotPlacedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to remove work resources from member cluster %s", memberCluster.ClusterName)
610
+
}
611
+
})
612
+
613
+
It("can delete the ResourcePlacement", func() {
614
+
rp:=&placementv1beta1.ResourcePlacement{
615
+
ObjectMeta: metav1.ObjectMeta{
616
+
Name: rpName,
617
+
Namespace: workNamespaceName,
618
+
},
619
+
}
620
+
Expect(hubClient.Delete(ctx, rp)).To(Succeed(), "Failed to delete ResourcePlacement")
621
+
})
622
+
623
+
It("should remove enveloped resources from all clusters", func() {
624
+
// Verify that all resources placed have been removed from specified member clusters.
Eventually(workResourcesRemovedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to remove work resources from member cluster %s", memberCluster.ClusterName)
629
+
}
630
+
})
631
+
632
+
It("should remove controller finalizers from ResourcePlacement", func() {
Eventually(finalizerRemovedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to remove controller finalizers from ResourcePlacement")
635
+
})
636
+
637
+
It("should not remove namespace on all member clusters", func() {
Eventually(workNamespacePlacedActual, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to place namespace on member cluster %s", memberCluster.ClusterName)
645
+
}
646
+
})
647
+
648
+
It("can delete the CRP", func() {
649
+
crp:=&placementv1beta1.ClusterResourcePlacement{
650
+
ObjectMeta: metav1.ObjectMeta{
651
+
Name: crpName,
652
+
},
653
+
}
654
+
Expect(hubClient.Delete(ctx, crp)).To(Succeed(), "Failed to delete CRP")
655
+
})
656
+
657
+
It("should remove placed resources from all member clusters", checkIfRemovedWorkResourcesFromAllMemberClusters)
658
+
659
+
It("should remove controller finalizers from CRP", func() {
0 commit comments