Skip to content

Commit 43c0024

Browse files
committed
e2e: update changed capi framework
1 parent 0e7c6af commit 43c0024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/gke.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ package e2e
2121

2222
import (
2323
"context"
24+
"fmt"
2425
"time"
2526

2627
. "github.com/onsi/ginkgo/v2"
@@ -48,7 +49,7 @@ type ApplyManagedClusterTemplateAndWaitInput struct {
4849
WaitForClusterIntervals []interface{}
4950
WaitForControlPlaneIntervals []interface{}
5051
WaitForMachinePools []interface{}
51-
Args []string // extra args to be used during `kubectl apply`
52+
Options []framework.CreateOrUpdateOption
5253
PreWaitForCluster func()
5354
PostMachinesProvisioned func()
5455
WaitForControlPlaneInitialized Waiter
@@ -76,8 +77,7 @@ func ApplyManagedClusterTemplateAndWait(ctx context.Context, input ApplyManagedC
7677
Expect(input.ConfigCluster.ControlPlaneMachineCount).ToNot(BeNil())
7778
Expect(input.ConfigCluster.WorkerMachineCount).ToNot(BeNil())
7879

79-
Byf("Creating the GKE workload cluster with name %q using the %q template (Kubernetes %s)",
80-
input.ConfigCluster.ClusterName, input.ConfigCluster.Flavor, input.ConfigCluster.KubernetesVersion)
80+
By(fmt.Sprintf("Creating the GKE workload cluster with name %q using the %q template (Kubernetes %s)", input.ConfigCluster.ClusterName, input.ConfigCluster.Flavor, input.ConfigCluster.KubernetesVersion))
8181

8282
By("Getting the cluster template yaml")
8383
workloadClusterTemplate := clusterctl.ConfigCluster(ctx, clusterctl.ConfigClusterInput{
@@ -102,7 +102,7 @@ func ApplyManagedClusterTemplateAndWait(ctx context.Context, input ApplyManagedC
102102

103103
By("Applying the cluster template yaml to the cluster")
104104
Eventually(func() error {
105-
return input.ClusterProxy.Apply(ctx, workloadClusterTemplate, input.Args...)
105+
return input.ClusterProxy.CreateOrUpdate(ctx, workloadClusterTemplate, input.Options...)
106106
}, 10*time.Second).Should(Succeed(), "Failed to apply the cluster template")
107107

108108
// Once we applied the cluster template we can run PreWaitForCluster.

0 commit comments

Comments
 (0)