Skip to content

Commit fa59192

Browse files
fabriziopandinik8s-infra-cherrypick-robot
authored andcommitted
Make clusterctl upgrade test to work when there are no machines
1 parent a331356 commit fa59192

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)