From 3bd4963294961e91c4ddc1accd92f7a6b6ca1d3f Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 20 May 2021 10:18:24 -0700 Subject: [PATCH] Update machinepool_helpers.go --- test/framework/machinepool_helpers.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/framework/machinepool_helpers.go b/test/framework/machinepool_helpers.go index 7443cde8778d..8e44f1314dc6 100644 --- a/test/framework/machinepool_helpers.go +++ b/test/framework/machinepool_helpers.go @@ -134,13 +134,10 @@ func UpgradeMachinePoolAndWait(ctx context.Context, input UpgradeMachinePoolAndW patchHelper, err := patch.NewHelper(mp, mgmtClient) Expect(err).ToNot(HaveOccurred()) + oldVersion := mp.Spec.Template.Spec.Version mp.Spec.Template.Spec.Version = &input.UpgradeVersion Expect(patchHelper.Patch(ctx, mp)).To(Succeed()) - } - for i := range input.MachinePools { - mp := input.MachinePools[i] - oldVersion := mp.Spec.Template.Spec.Version log.Logf("Waiting for Kubernetes versions of machines in MachinePool %s/%s to be upgraded from %s to %s", mp.Namespace, mp.Name, *oldVersion, input.UpgradeVersion) WaitForMachinePoolInstancesToBeUpgraded(ctx, WaitForMachinePoolInstancesToBeUpgradedInput{ @@ -216,7 +213,7 @@ func WaitForMachinePoolInstancesToBeUpgraded(ctx context.Context, input WaitForM return 0, err } versions := getMachinePoolInstanceVersions(ctx, GetMachinesPoolInstancesInput{ - Getter: input.Getter, + Getter: input.WorkloadClusterGetter, Namespace: input.Cluster.Namespace, MachinePool: input.MachinePool, })