Skip to content

Commit 8415ae7

Browse files
committed
Fix cross-ns scale test
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent 999e076 commit 8415ae7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/e2e/scale.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,13 +785,14 @@ func createClusterWorker(ctx context.Context, clusterProxy framework.ClusterProx
785785

786786
// Adjust namespace and name in Cluster YAML
787787
clusterTemplateYAML := customizedClusterTemplateYAML
788+
// Change Cluster.metadata.namespace.
789+
clusterTemplateYAML = bytes.Replace(clusterTemplateYAML, []byte(scaleClusterNamespacePlaceholder), []byte(namespaceName), 1)
788790
if enableCrossNamespaceClusterClass {
789-
// Set classNamespace to the defaultNamespace where the ClusterClass is located.
791+
// Change Cluster.spec.topology.classRef.namespace to the defaultNamespace where the ClusterClass is located.
790792
clusterTemplateYAML = bytes.ReplaceAll(clusterTemplateYAML,
791-
[]byte(fmt.Sprintf("classNamespace: %s", scaleClusterNamespacePlaceholder)),
792-
[]byte(fmt.Sprintf("classNamespace: %s", defaultNamespace)))
793+
[]byte(fmt.Sprintf("namespace: %s", scaleClusterNamespacePlaceholder)),
794+
[]byte(fmt.Sprintf("namespace: %s", defaultNamespace)))
793795
}
794-
clusterTemplateYAML = bytes.ReplaceAll(clusterTemplateYAML, []byte(scaleClusterNamespacePlaceholder), []byte(namespaceName))
795796
clusterTemplateYAML = bytes.ReplaceAll(clusterTemplateYAML, []byte(scaleClusterNamePlaceholder), []byte(clusterName))
796797

797798
// Deploy Cluster.

0 commit comments

Comments
 (0)