@@ -611,7 +611,7 @@ func TestComputeControlPlaneVersion(t *testing.T) {
611611 defer utilfeature .SetFeatureGateDuringTest (t , feature .Gates , feature .RuntimeSDK , true )()
612612
613613 // Note: the version used by the machine deployments does
614- // not affect how we determining the control plane version.
614+ // not affect how we're determining the control plane version.
615615 // We only want to know if the machine deployments are stable.
616616 //
617617 // A machine deployment is considered stable if all the following are true:
@@ -706,10 +706,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
706706 "spec.replicas" : int64 (2 ),
707707 }).
708708 WithStatusFields (map [string ]interface {}{
709- "status.version" : "v1.2.2" ,
710- "status.replicas" : int64 (2 ),
711- "status.updatedReplicas" : int64 (2 ),
712- "status.readyReplicas" : int64 (2 ),
709+ "status.version" : "v1.2.2" ,
710+ "status.replicas" : int64 (2 ),
711+ "status.updatedReplicas" : int64 (2 ),
712+ "status.readyReplicas" : int64 (2 ),
713+ "status.unavailableReplicas" : int64 (0 ),
713714 }).
714715 Build (),
715716 expectedVersion : "v1.2.3" ,
@@ -739,10 +740,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
739740 "spec.replicas" : int64 (2 ),
740741 }).
741742 WithStatusFields (map [string ]interface {}{
742- "status.version" : "v1.2.2" ,
743- "status.replicas" : int64 (1 ),
744- "status.updatedReplicas" : int64 (1 ),
745- "status.readyReplicas" : int64 (1 ),
743+ "status.version" : "v1.2.2" ,
744+ "status.replicas" : int64 (1 ),
745+ "status.updatedReplicas" : int64 (1 ),
746+ "status.readyReplicas" : int64 (1 ),
747+ "status.unavailableReplicas" : int64 (0 ),
746748 }).
747749 Build (),
748750 expectedVersion : "v1.2.2" ,
@@ -756,10 +758,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
756758 "spec.replicas" : int64 (2 ),
757759 }).
758760 WithStatusFields (map [string ]interface {}{
759- "status.version" : "v1.2.2" ,
760- "status.replicas" : int64 (2 ),
761- "status.updatedReplicas" : int64 (2 ),
762- "status.readyReplicas" : int64 (2 ),
761+ "status.version" : "v1.2.2" ,
762+ "status.replicas" : int64 (2 ),
763+ "status.updatedReplicas" : int64 (2 ),
764+ "status.readyReplicas" : int64 (2 ),
765+ "status.unavailableReplicas" : int64 (0 ),
763766 }).
764767 Build (),
765768 machineDeploymentsState : scope.MachineDeploymentsStateMap {
@@ -778,10 +781,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
778781 "spec.replicas" : int64 (2 ),
779782 }).
780783 WithStatusFields (map [string ]interface {}{
781- "status.version" : "v1.2.2" ,
782- "status.replicas" : int64 (2 ),
783- "status.updatedReplicas" : int64 (2 ),
784- "status.readyReplicas" : int64 (2 ),
784+ "status.version" : "v1.2.2" ,
785+ "status.replicas" : int64 (2 ),
786+ "status.updatedReplicas" : int64 (2 ),
787+ "status.readyReplicas" : int64 (2 ),
788+ "status.unavailableReplicas" : int64 (0 ),
785789 }).
786790 Build (),
787791 machineDeploymentsState : scope.MachineDeploymentsStateMap {
@@ -800,10 +804,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
800804 "spec.replicas" : int64 (2 ),
801805 }).
802806 WithStatusFields (map [string ]interface {}{
803- "status.version" : "v1.2.2" ,
804- "status.replicas" : int64 (2 ),
805- "status.updatedReplicas" : int64 (2 ),
806- "status.readyReplicas" : int64 (2 ),
807+ "status.version" : "v1.2.2" ,
808+ "status.replicas" : int64 (2 ),
809+ "status.updatedReplicas" : int64 (2 ),
810+ "status.readyReplicas" : int64 (2 ),
811+ "status.unavailableReplicas" : int64 (0 ),
807812 }).
808813 Build (),
809814 machineDeploymentsState : scope.MachineDeploymentsStateMap {
@@ -822,10 +827,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
822827 "spec.replicas" : int64 (2 ),
823828 }).
824829 WithStatusFields (map [string ]interface {}{
825- "status.version" : "v1.2.2" ,
826- "status.replicas" : int64 (2 ),
827- "status.updatedReplicas" : int64 (2 ),
828- "status.readyReplicas" : int64 (2 ),
830+ "status.version" : "v1.2.2" ,
831+ "status.replicas" : int64 (2 ),
832+ "status.updatedReplicas" : int64 (2 ),
833+ "status.readyReplicas" : int64 (2 ),
834+ "status.unavailableReplicas" : int64 (0 ),
829835 }).
830836 Build (),
831837 machineDeploymentsState : scope.MachineDeploymentsStateMap {
@@ -1211,10 +1217,11 @@ func TestComputeControlPlaneVersion(t *testing.T) {
12111217 "spec.replicas" : int64 (2 ),
12121218 }).
12131219 WithStatusFields (map [string ]interface {}{
1214- "status.version" : "v1.2.2" ,
1215- "status.replicas" : int64 (2 ),
1216- "status.updatedReplicas" : int64 (2 ),
1217- "status.readyReplicas" : int64 (2 ),
1220+ "status.version" : "v1.2.2" ,
1221+ "status.replicas" : int64 (2 ),
1222+ "status.updatedReplicas" : int64 (2 ),
1223+ "status.readyReplicas" : int64 (2 ),
1224+ "status.unavailableReplicas" : int64 (0 ),
12181225 }).
12191226 Build ()
12201227
@@ -1697,10 +1704,11 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
16971704 "spec.replicas" : int64 (2 ),
16981705 }).
16991706 WithStatusFields (map [string ]interface {}{
1700- "status.version" : "v1.2.2" ,
1701- "status.replicas" : int64 (2 ),
1702- "status.updatedReplicas" : int64 (2 ),
1703- "status.readyReplicas" : int64 (2 ),
1707+ "status.version" : "v1.2.2" ,
1708+ "status.replicas" : int64 (2 ),
1709+ "status.updatedReplicas" : int64 (2 ),
1710+ "status.readyReplicas" : int64 (2 ),
1711+ "status.unavailableReplicas" : int64 (0 ),
17041712 }).
17051713 Build ()
17061714 controlPlaneStable123 := builder .ControlPlane ("test1" , "cp1" ).
@@ -1709,10 +1717,11 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
17091717 "spec.replicas" : int64 (2 ),
17101718 }).
17111719 WithStatusFields (map [string ]interface {}{
1712- "status.version" : "v1.2.3" ,
1713- "status.replicas" : int64 (2 ),
1714- "status.updatedReplicas" : int64 (2 ),
1715- "status.readyReplicas" : int64 (2 ),
1720+ "status.version" : "v1.2.3" ,
1721+ "status.replicas" : int64 (2 ),
1722+ "status.updatedReplicas" : int64 (2 ),
1723+ "status.readyReplicas" : int64 (2 ),
1724+ "status.unavailableReplicas" : int64 (0 ),
17161725 }).
17171726 Build ()
17181727 controlPlaneUpgrading := builder .ControlPlane ("test1" , "cp1" ).
@@ -1729,10 +1738,11 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
17291738 "spec.replicas" : int64 (2 ),
17301739 }).
17311740 WithStatusFields (map [string ]interface {}{
1732- "status.version" : "v1.2.3" ,
1733- "status.replicas" : int64 (1 ),
1734- "status.updatedReplicas" : int64 (1 ),
1735- "status.readyReplicas" : int64 (1 ),
1741+ "status.version" : "v1.2.3" ,
1742+ "status.replicas" : int64 (1 ),
1743+ "status.updatedReplicas" : int64 (1 ),
1744+ "status.readyReplicas" : int64 (1 ),
1745+ "status.unavailableReplicas" : int64 (0 ),
17361746 }).
17371747 Build ()
17381748 controlPlaneDesired := builder .ControlPlane ("test1" , "cp1" ).
0 commit comments