diff --git a/test/e2e/scale.go b/test/e2e/scale.go index 53dc892553..b04d140070 100644 --- a/test/e2e/scale.go +++ b/test/e2e/scale.go @@ -111,6 +111,36 @@ var _ = Describe("Simulated Scale", func() { } } + // rejoin when errorOnExisting=false + for i := 0; i < framework.TestContext.ScaleClusterCount; i++ { + memberCluster := fmt.Sprintf("scale-member-%d-%s", i, nameToken) + memberClusters = append(memberClusters, memberCluster) + joiningNamespace := memberCluster + + secretName := memberCluster + + _, err := kubefedctl.TestOnlyJoinClusterForNamespace( + hostConfig, hostConfig, hostNamespace, + joiningNamespace, hostCluster, memberCluster, + secretName, apiextv1.NamespaceScoped, false, false) + + _, errReJoin := kubefedctl.TestOnlyJoinClusterForNamespace( + hostConfig, hostConfig, hostNamespace, + joiningNamespace, hostCluster, memberCluster, + secretName, apiextv1.NamespaceScoped, false, false) + + defer func() { + framework.DeleteNamespace(client, joiningNamespace) + }() + if err != nil { + tl.Fatalf("Error joining cluster %s: %v", memberCluster, err) + } + + if errReJoin != nil { + tl.Fatalf("Error joining cluster %s: %v", memberCluster, err) + } + } + // Override naming methods to allow the sync controller to // work with a simulated scale environment.