Skip to content

Commit 190f544

Browse files
chrischdik8s-infra-cherrypick-robot
authored andcommitted
e2e: do not expect Machines for MachinePools not supporting Machines
1 parent d180832 commit 190f544

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/e2e/clusterctl_upgrade.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,11 @@ func calculateExpectedMachinePoolMachineCount(ctx context.Context, c client.Clie
10431043
return 0, err
10441044
}
10451045

1046+
// The MachinePool does not support machines if the field does not exist.
1047+
if errors.Is(err, util.ErrUnstructuredFieldNotFound) {
1048+
continue
1049+
}
1050+
10461051
replicas, found, err := unstructured.NestedInt64(mp.Object, "spec", "replicas")
10471052
if err == nil && found {
10481053
expectedMachinePoolMachineCount += replicas

0 commit comments

Comments
 (0)