Skip to content

Commit a2f6e59

Browse files
authored
Merge pull request #13072 from fabriziopandini/make-clusterctl-upgrade-work-without-machines
🌱 Make clusterctl upgrade test to work when there are no machines
2 parents 83efbb1 + 597a1cd commit a2f6e59

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/e2e/clusterctl_upgrade.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,14 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
738738
Namespace: workloadCluster.Namespace,
739739
})
740740

741-
Byf("[%d] Verify Machines Ready condition is true", i)
742-
framework.VerifyMachinesReady(ctx, framework.VerifyMachinesReadyInput{
743-
Lister: managementClusterProxy.GetClient(),
744-
Name: workloadCluster.Name,
745-
Namespace: workloadCluster.Namespace,
746-
})
741+
if len(postUpgradeMachineList.Items) > 0 {
742+
Byf("[%d] Verify Machines Ready condition is true", i)
743+
framework.VerifyMachinesReady(ctx, framework.VerifyMachinesReadyInput{
744+
Lister: managementClusterProxy.GetClient(),
745+
Name: workloadCluster.Name,
746+
Namespace: workloadCluster.Namespace,
747+
})
748+
}
747749
}
748750

749751
// Note: It is a known issue on Kubernetes < v1.29 that SSA sometimes fail:

0 commit comments

Comments
 (0)