Skip to content

Commit e25c767

Browse files
committed
Fixed 2 cluster e2e test
1 parent f51bd03 commit e25c767

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

test/e2e/config/cloudstack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ variables:
113113
CLOUDSTACK_NETWORK_NAME: isolated-for-e2e-1
114114
CLOUDSTACK_NEW_NETWORK_NAME: isolated-for-e2e-new
115115
CLUSTER_ENDPOINT_IP: 172.16.2.199
116+
CLUSTER_ENDPOINT_IP_2: 172.16.2.199
116117
CLUSTER_ENDPOINT_NEW_IP: 172.16.2.201
117118
CLUSTER_ENDPOINT_PORT: 6443
118119
CLUSTER_ENDPOINT_PORT_2: 6444

test/e2e/data/infrastructure-cloudstack/v1beta1/cluster-template-second-cluster/cloudstack-cluster.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ spec:
77
- name: ${CLOUDSTACK_ZONE_NAME}
88
network:
99
name: ${CLOUDSTACK_NETWORK_NAME}
10-
account: ${CLOUDSTACK_INVALID_ACCOUNT_NAME}
10+
account: ${CLOUDSTACK_ACCOUNT_NAME}
1111
domain: ${CLOUDSTACK_DOMAIN_NAME}
1212
controlPlaneEndpoint:
13-
host: ${CLUSTER_ENDPOINT_IP}
14-
port: ${CLUSTER_ENDPOINT_PORT_2}
13+
host: ${CLUSTER_ENDPOINT_IP_2}
14+
port: ${CLUSTER_ENDPOINT_PORT}

test/e2e/second_cluster.go renamed to test/e2e/two_clusters.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ import (
3131
"sigs.k8s.io/cluster-api/util"
3232
)
3333

34-
// SecondClusterSpec implements a test that verifies two clusters can co-exist.
35-
func SecondClusterSpec(ctx context.Context, inputGetter func() CommonSpecInput) {
34+
// TwoClustersSpec implements a test that verifies two clusters can co-exist.
35+
func TwoClustersSpec(ctx context.Context, inputGetter func() CommonSpecInput) {
3636

37-
const specName = "second-cluster"
37+
const specName = "two-clusters"
3838

3939
var (
4040
input CommonSpecInput
@@ -85,7 +85,7 @@ func SecondClusterSpec(ctx context.Context, inputGetter func() CommonSpecInput)
8585
clusterResources2 = new(clusterctl.ApplyClusterTemplateAndWaitResult)
8686
})
8787

88-
It("should successfully add and remove a second cluster", func() {
88+
It("should successfully add and remove a second cluster without breaking the first cluster", func() {
8989
mgmtClient := input.BootstrapClusterProxy.GetClient()
9090

9191
By("Create the first cluster and verify that it's ready")

test/e2e/second_cluster_test.go renamed to test/e2e/two_clusters_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
. "github.com/onsi/ginkgo"
2525
)
2626

27-
var _ = Describe("with a second cluster", func() {
27+
var _ = Describe("with two clusters", func() {
2828

29-
SecondClusterSpec(context.TODO(), func() CommonSpecInput {
29+
TwoClustersSpec(context.TODO(), func() CommonSpecInput {
3030
return CommonSpecInput{
3131
E2EConfig: e2eConfig,
3232
ClusterctlConfigPath: clusterctlConfigPath,

0 commit comments

Comments
 (0)