Skip to content

Commit

Permalink
Update machinepool_helpers.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed May 20, 2021
1 parent 856cb3c commit 3bd4963
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/framework/machinepool_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
})
Expand Down

0 comments on commit 3bd4963

Please sign in to comment.