Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwq1990 committed Dec 21, 2020
1 parent 90e0d98 commit 77af1e6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/e2e/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 77af1e6

Please sign in to comment.