From 9145427b3a1b941b5d79fff1f0b5c5a4fdcec0de Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Tue, 18 Apr 2023 12:37:34 +0800 Subject: [PATCH] fix: fixed controllers/apps/cluster_controller_test.go setup error --- controllers/apps/cluster_controller_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/apps/cluster_controller_test.go b/controllers/apps/cluster_controller_test.go index 664b88019..9e2f6b0b8 100644 --- a/controllers/apps/cluster_controller_test.go +++ b/controllers/apps/cluster_controller_test.go @@ -1216,7 +1216,7 @@ var _ = Describe("Cluster Controller", func() { BeforeEach(func() { By("Create a clusterDefinition obj") clusterDefObj = testapps.NewClusterDefFactory(clusterDefName). - AddComponentDef(testapps.StatefulMySQLComponent, replicationCompDefName). + AddComponentDef(testapps.ReplicationRedisComponent, replicationCompDefName). Create(&testCtx).GetObject() }) @@ -1239,7 +1239,7 @@ var _ = Describe("Cluster Controller", func() { clusterDefObj = testapps.NewClusterDefFactory(clusterDefName). AddComponentDef(testapps.StatefulMySQLComponent, statefulCompDefName). AddComponentDef(testapps.ConsensusMySQLComponent, consensusCompDefName). - AddComponentDef(testapps.StatefulMySQLComponent, replicationCompDefName). + AddComponentDef(testapps.ReplicationRedisComponent, replicationCompDefName). AddComponentDef(testapps.StatelessNginxComponent, statelessCompDefName). Create(&testCtx).GetObject() @@ -1274,12 +1274,12 @@ var _ = Describe("Cluster Controller", func() { BeforeEach(func() { By("Create a clusterDefinition obj") clusterDefObj = testapps.NewClusterDefFactory(clusterDefName). - AddComponentDef(testapps.StatefulMySQLComponent, replicationCompDefName). + AddComponentDef(testapps.StatefulMySQLComponent, statefulCompDefName). Create(&testCtx).GetObject() By("Create a clusterVersion obj") clusterVersionObj = testapps.NewClusterVersionFactory(clusterVersionName, clusterDefObj.GetName()). - AddComponent(replicationCompDefName).AddContainerShort("mysql", testapps.ApeCloudMySQLImage). + AddComponent(statefulCompDefName).AddContainerShort("mysql", testapps.ApeCloudMySQLImage). Create(&testCtx).GetObject() By("Creating a BackupPolicyTemplate") @@ -1339,12 +1339,12 @@ var _ = Describe("Cluster Controller", func() { BeforeEach(func() { By("Create a clusterDef obj") clusterDefObj = testapps.NewClusterDefFactory(clusterDefName). - AddComponentDef(testapps.ConsensusMySQLComponent, replicationCompDefName). + AddComponentDef(testapps.ConsensusMySQLComponent, consensusCompDefName). Create(&testCtx).GetObject() By("Create a clusterVersion obj") clusterVersionObj = testapps.NewClusterVersionFactory(clusterVersionName, clusterDefObj.GetName()). - AddComponent(replicationCompDefName).AddContainerShort("mysql", testapps.ApeCloudMySQLImage). + AddComponent(consensusCompDefName).AddContainerShort("mysql", testapps.ApeCloudMySQLImage). Create(&testCtx).GetObject() By("Creating a BackupPolicyTemplate")