diff --git a/docs/demos/ArgoCD/fleet-argocd-integration.md b/docs/demos/ArgoCD/fleet-argocd-integration.md index 152149c1e..b7c68458f 100644 --- a/docs/demos/ArgoCD/fleet-argocd-integration.md +++ b/docs/demos/ArgoCD/fleet-argocd-integration.md @@ -129,7 +129,7 @@ spec: source: path: docs/demos/ArgoCD/manifests/guestbook repoURL: https://github.com/Azure/fleet.git - targetRevision: master + targetRevision: main syncPolicy: automated: prune: true @@ -548,7 +548,7 @@ guestbook guestbook-app Synced Healthy kubectl get cm -n guestbook test-config -o yaml apiVersion: v1 data: - branch: master + branch: main cluster: member1 # <- member1 exclusive kind: ConfigMap metadata: @@ -565,7 +565,7 @@ guestbook guestbook-app Synced Healthy kubectl get cm -n guestbook test-config -o yaml apiVersion: v1 data: - branch: master + branch: main cluster: member2 # <- member2 exclusive kind: ConfigMap metadata: @@ -582,7 +582,7 @@ guestbook guestbook-app Synced Healthy kubectl get cm -n guestbook test-config -o yaml apiVersion: v1 data: - branch: master + branch: main cluster: member3 # <- member3 exclusive kind: ConfigMap metadata: diff --git a/docs/demos/ArgoCD/manifests/guestbook-app.yaml b/docs/demos/ArgoCD/manifests/guestbook-app.yaml index b93ce5b9e..45c6e73eb 100644 --- a/docs/demos/ArgoCD/manifests/guestbook-app.yaml +++ b/docs/demos/ArgoCD/manifests/guestbook-app.yaml @@ -11,7 +11,7 @@ spec: source: path: docs/demos/ArgoCD/manifests/guestbook # manifest path repoURL: https://github.com/Azure/fleet.git # source repo - targetRevision: argocd-demo # source branch + targetRevision: main # source branch syncPolicy: automated: prune: true diff --git a/docs/demos/ArgoCD/manifests/guestbook/member1/test-configmap.yaml b/docs/demos/ArgoCD/manifests/guestbook/member1/test-configmap.yaml index 9e1030f60..c989b897b 100644 --- a/docs/demos/ArgoCD/manifests/guestbook/member1/test-configmap.yaml +++ b/docs/demos/ArgoCD/manifests/guestbook/member1/test-configmap.yaml @@ -3,5 +3,5 @@ kind: ConfigMap metadata: name: test-config data: - branch: master + branch: main cluster: member1 diff --git a/docs/demos/ArgoCD/manifests/guestbook/member2/test-configmap.yaml b/docs/demos/ArgoCD/manifests/guestbook/member2/test-configmap.yaml index 04c48e416..d2240d5e9 100644 --- a/docs/demos/ArgoCD/manifests/guestbook/member2/test-configmap.yaml +++ b/docs/demos/ArgoCD/manifests/guestbook/member2/test-configmap.yaml @@ -3,5 +3,5 @@ kind: ConfigMap metadata: name: test-config data: - branch: master + branch: main cluster: member2 diff --git a/docs/demos/ArgoCD/manifests/guestbook/member3/test-configmap.yaml b/docs/demos/ArgoCD/manifests/guestbook/member3/test-configmap.yaml index cebeb9ff7..2d9b13e04 100644 --- a/docs/demos/ArgoCD/manifests/guestbook/member3/test-configmap.yaml +++ b/docs/demos/ArgoCD/manifests/guestbook/member3/test-configmap.yaml @@ -3,5 +3,5 @@ kind: ConfigMap metadata: name: test-config data: - branch: master + branch: main cluster: member3 diff --git a/test/e2e/enveloped_object_placement_test.go b/test/e2e/enveloped_object_placement_test.go index 653a5d7ae..1f719b22e 100644 --- a/test/e2e/enveloped_object_placement_test.go +++ b/test/e2e/enveloped_object_placement_test.go @@ -342,7 +342,7 @@ var _ = Describe("Process objects with generate name", Ordered, func() { // Create the namespace with both name and generate name set. ns := appNamespace() ns.GenerateName = nsGenerateName - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // Create an envelope config map. cm := &corev1.ConfigMap{ @@ -481,11 +481,8 @@ var _ = Describe("Process objects with generate name", Ordered, func() { }) AfterAll(func() { - // Remove the CRP. - cleanupCRP(crpName) - - // Clean the placed resources. - cleanWorkResourcesOnCluster(allMemberClusters[0]) + By(fmt.Sprintf("deleting placement %s and related resources", crpName)) + ensureCRPAndRelatedResourcesDeleted(crpName, allMemberClusters) }) }) @@ -638,7 +635,7 @@ func readEnvelopTestManifests() { // createWrappedResourcesForEnvelopTest creates some enveloped resources on the hub cluster for testing purposes. func createWrappedResourcesForEnvelopTest() { ns := appNamespace() - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // modify the configMap according to the namespace testConfigMap.Namespace = ns.Name Expect(hubClient.Create(ctx, &testConfigMap)).To(Succeed(), "Failed to create config map %s", testConfigMap.Name) diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index d57d43778..4c6baf161 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -668,7 +668,7 @@ func createWorkResource(name, namespace string) { // createWorkResources creates some resources on the hub cluster for testing purposes. func createWorkResources() { ns := appNamespace() - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) configMap := appConfigMap() Expect(hubClient.Create(ctx, &configMap)).To(Succeed(), "Failed to create config map %s", configMap.Name) @@ -681,7 +681,7 @@ func cleanupWorkResources() { func cleanWorkResourcesOnCluster(cluster *framework.Cluster) { ns := appNamespace() - Expect(client.IgnoreNotFound(cluster.KubeClient.Delete(ctx, &ns))).To(Succeed(), "Failed to delete namespace %s", ns.Namespace) + Expect(client.IgnoreNotFound(cluster.KubeClient.Delete(ctx, &ns))).To(Succeed(), "Failed to delete namespace %s", ns.Name) workResourcesRemovedActual := workNamespaceRemovedFromClusterActual(cluster) Eventually(workResourcesRemovedActual, workloadEventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to remove work resources from %s cluster", cluster.ClusterName) diff --git a/test/upgrade/before/scenarios_test.go b/test/upgrade/before/scenarios_test.go index 9727b2b4d..acf974f58 100644 --- a/test/upgrade/before/scenarios_test.go +++ b/test/upgrade/before/scenarios_test.go @@ -72,7 +72,7 @@ var _ = Describe("CRP with non-trackable resources, all available (before upgrad BeforeAll(func() { // Create the resources. ns := appNamespace(workNamespaceName, crpName) - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // Job is currently untrackable in Fleet. job := batchv1.Job{ @@ -159,7 +159,7 @@ var _ = Describe("CRP with availability failure (before upgrade)", Ordered, func BeforeAll(func() { // Create the resources. ns := appNamespace(workNamespaceName, crpName) - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // Use a Service of the LoadBalancer type as by default KinD environment does not support // this service type and such services will always be unavailable. @@ -266,7 +266,7 @@ var _ = Describe("CRP with apply op failure (before upgrade)", Ordered, func() { // Create the resources on the member cluster with a custom manager ns := appNamespace(workNamespaceName, crpName) - Expect(memberCluster1EastProdClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(memberCluster1EastProdClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) configMap := appConfigMap(workNamespaceName, appConfigMapName) configMap.Data = map[string]string{ @@ -368,7 +368,7 @@ var _ = Describe("CRP stuck in the rollout process (blocked by availability fail BeforeAll(func() { // Create the resources. ns := appNamespace(workNamespaceName, crpName) - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // Use a Service of the ClusterIP type. KinD supports it and it will become available // once an IP has been assigned. @@ -697,7 +697,7 @@ var _ = Describe("CRP stuck in the rollout process (long wait time)", Ordered, f BeforeAll(func() { // Create the resources. ns := appNamespace(workNamespaceName, crpName) - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) // Job is currently untrackable in Fleet. originalJob = &batchv1.Job{ diff --git a/test/upgrade/before/utils_test.go b/test/upgrade/before/utils_test.go index 00f0ce0a1..87cceeab5 100644 --- a/test/upgrade/before/utils_test.go +++ b/test/upgrade/before/utils_test.go @@ -104,7 +104,7 @@ func checkIfAllMemberClustersHaveJoined() { // createWorkResources creates some resources on the hub cluster for testing purposes. func createWorkResources(workNamespaceName, appConfigMapName, crpName string) { ns := appNamespace(workNamespaceName, crpName) - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Namespace) + Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) configMap := appConfigMap(workNamespaceName, appConfigMapName) Expect(hubClient.Create(ctx, &configMap)).To(Succeed(), "Failed to create config map %s", configMap.Name)