Skip to content

Commit 8bef10e

Browse files
committed
Updates format string to "%s-%s"
1 parent d74260b commit 8bef10e

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

test/e2e/suites/conformance/conformance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var _ = ginkgo.Describe("[unmanaged] [conformance] tests", func() {
5757
})
5858
ginkgo.Measure(specName, func(b ginkgo.Benchmarker) {
5959

60-
name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
60+
name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
6161
shared.SetEnvVar("USE_CI_ARTIFACTS", "true", false)
6262
kubernetesVersion := e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion)
6363
flavor := clusterctl.DefaultFlavor

test/e2e/suites/managed/eks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
5454

5555
ctx = context.TODO()
5656
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
57-
clusterName = fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
57+
clusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6))
5858

5959
ginkgo.By("default iam role should exist")
6060
verifyRoleExistsAndOwned(ekscontrolplanev1.DefaultEKSControlPlaneRole, clusterName, false, e2eCtx.BootstrapUserAWSSession)

test/e2e/suites/managed/upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var _ = ginkgo.Describe("EKS Cluster upgrade test", func() {
5454

5555
ctx = context.TODO()
5656
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
57-
clusterName = fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
57+
clusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6))
5858

5959
ginkgo.By("default iam role should exist")
6060
verifyRoleExistsAndOwned(ekscontrolplanev1.DefaultEKSControlPlaneRole, clusterName, false, e2eCtx.BootstrapUserAWSSession)

test/e2e/suites/unmanaged/unmanaged_functional_test.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
7070
defer shared.ReleaseResources(requiredResources, config.GinkgoConfig.ParallelNode, flock.New(shared.ResourceQuotaFilePath))
7171

7272
ginkgo.By("Creating cluster with a single worker")
73-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
73+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
7474

7575
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
7676
ClusterProxy: e2eCtx.Environment.BootstrapClusterProxy,
@@ -118,7 +118,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
118118
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
119119
Expect(shared.SetMultitenancyEnvVars(e2eCtx.AWSSession)).To(Succeed())
120120
ginkgo.By("Creating cluster")
121-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
121+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
122122
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
123123
ClusterProxy: e2eCtx.Environment.BootstrapClusterProxy,
124124
ConfigCluster: clusterctl.ConfigClusterInput{
@@ -158,7 +158,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
158158
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
159159
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
160160
ginkgo.By("Creating first cluster with single control plane")
161-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
161+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
162162
shared.SetEnvVar("USE_CI_ARTIFACTS", "true", false)
163163
tagPrefix := "v"
164164
searchSemVer, err := semver.Make(strings.TrimPrefix(e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion), tagPrefix))
@@ -214,7 +214,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
214214
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
215215

216216
ginkgo.By("Creating first cluster with single control plane")
217-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
217+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
218218
configCluster := defaultConfigCluster(cluster1Name, namespace.Name)
219219
configCluster.KubernetesVersion = e2eCtx.E2EConfig.GetVariable(shared.PreCSIKubernetesVer)
220220
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)
@@ -281,7 +281,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
281281
namespace := shared.SetupNamespace(ctx, specName, e2eCtx)
282282
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
283283
ginkgo.By("Creating first cluster with single control plane")
284-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
284+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
285285

286286
configCluster := defaultConfigCluster(cluster1Name, namespace.Name)
287287
configCluster.KubernetesVersion = e2eCtx.E2EConfig.GetVariable(shared.PreCSIKubernetesVer)
@@ -351,7 +351,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
351351
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
352352

353353
ginkgo.By("Creating first cluster with single control plane")
354-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
354+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
355355
configCluster := defaultConfigCluster(cluster1Name, namespace.Name)
356356
configCluster.KubernetesVersion = e2eCtx.E2EConfig.GetVariable(shared.PreCSIKubernetesVer)
357357

@@ -420,7 +420,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
420420
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
421421

422422
ginkgo.By("Creating a cluster")
423-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
423+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
424424
configCluster := defaultConfigCluster(clusterName, namespace.Name)
425425
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
426426
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)
@@ -453,7 +453,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
453453
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
454454
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
455455
ginkgo.By("Creating a cluster")
456-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
456+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
457457
configCluster := defaultConfigCluster(clusterName, namespace.Name)
458458
_, _, _ = createCluster(ctx, configCluster, result)
459459

@@ -504,7 +504,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
504504
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
505505
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
506506
ginkgo.By("Creating a cluster")
507-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
507+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
508508
configCluster := defaultConfigCluster(clusterName, namespace.Name)
509509
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(3)
510510
configCluster.Flavor = shared.MultiAzFlavor
@@ -566,7 +566,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
566566
e2eCtx.Environment.Namespaces[ns2] = cf2
567567

568568
ginkgo.By("Creating first cluster")
569-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
569+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
570570
configCluster := defaultConfigCluster(cluster1Name, ns1.Name)
571571
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)
572572
configCluster.Flavor = shared.LimitAzFlavor
@@ -581,7 +581,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
581581
framework.DiscoveryAndWaitForMachineDeployments(ctx, framework.DiscoveryAndWaitForMachineDeploymentsInput{Cluster: cluster1, Lister: e2eCtx.Environment.BootstrapClusterProxy.GetClient()}, e2eCtx.E2EConfig.GetIntervals("", "wait-worker-nodes")...)
582582

583583
ginkgo.By("Creating second cluster")
584-
cluster2Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
584+
cluster2Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
585585
configCluster = defaultConfigCluster(cluster2Name, ns2.Name)
586586
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)
587587
configCluster.Flavor = shared.LimitAzFlavor
@@ -634,13 +634,13 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
634634
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
635635
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
636636
ginkgo.By("Creating first cluster with single control plane")
637-
cluster1Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
637+
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
638638
configCluster := defaultConfigCluster(cluster1Name, namespace.Name)
639639
configCluster.Flavor = shared.LimitAzFlavor
640640
cluster1, _, _ := createCluster(ctx, configCluster, result)
641641

642642
ginkgo.By("Creating second cluster with single control plane")
643-
cluster2Name := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
643+
cluster2Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
644644
configCluster = defaultConfigCluster(cluster2Name, namespace.Name)
645645
configCluster.Flavor = shared.LimitAzFlavor
646646
cluster2, _, _ := createCluster(ctx, configCluster, result)
@@ -662,7 +662,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
662662
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
663663
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
664664
ginkgo.By("Creating a cluster")
665-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
665+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
666666
configCluster := defaultConfigCluster(clusterName, namespace.Name)
667667
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)
668668
configCluster.Flavor = shared.SpotInstancesFlavor
@@ -693,10 +693,10 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
693693
var specName string
694694
var namespace *corev1.Namespace
695695
var requiredResources *shared.TestResource
696-
mgmtClusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
696+
mgmtClusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
697697
mgmtClusterInfra := new(shared.AWSInfrastructure)
698698

699-
wlClusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
699+
wlClusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
700700
wlClusterInfra := new(shared.AWSInfrastructure)
701701

702702
var cPeering *ec2.VpcPeeringConnection
@@ -944,7 +944,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
944944
specName := "functional-test-ignition-parameter"
945945
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
946946
ginkgo.By("Creating a cluster")
947-
clusterName := fmt.Sprintf("cluster-%s-%s", specName, util.RandomString(6))
947+
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
948948
configCluster := defaultConfigCluster(clusterName, namespace.Name)
949949
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
950950
configCluster.WorkerMachineCount = pointer.Int64Ptr(1)

0 commit comments

Comments
 (0)