3131 Kind : "ClusterRole" ,
3232 Name : "test-cluster-role" ,
3333 }
34- errString = "the rollout Strategy field is invalid: maxUnavailable must be greater than or equal to 1 , got `0 `"
34+ errString = "the rollout Strategy field is invalid: maxUnavailable must be greater than or equal to 0 , got `-1 `"
3535)
3636
3737func TestHandle (t * testing.T ) {
@@ -48,7 +48,7 @@ func TestHandle(t *testing.T) {
4848 Strategy : placementv1beta1.RolloutStrategy {
4949 Type : placementv1beta1 .RollingUpdateRolloutStrategyType ,
5050 RollingUpdate : & placementv1beta1.RollingUpdateConfig {
51- MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : 0 },
51+ MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : - 1 },
5252 },
5353 },
5454 },
@@ -68,7 +68,7 @@ func TestHandle(t *testing.T) {
6868 Strategy : placementv1beta1.RolloutStrategy {
6969 Type : placementv1beta1 .RollingUpdateRolloutStrategyType ,
7070 RollingUpdate : & placementv1beta1.RollingUpdateConfig {
71- MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : 0 },
71+ MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : - 1 },
7272 MaxSurge : & intstr.IntOrString {Type : intstr .Int , IntVal : 0 },
7373 },
7474 },
@@ -89,7 +89,7 @@ func TestHandle(t *testing.T) {
8989 Strategy : placementv1beta1.RolloutStrategy {
9090 Type : placementv1beta1 .RollingUpdateRolloutStrategyType ,
9191 RollingUpdate : & placementv1beta1.RollingUpdateConfig {
92- MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : 0 },
92+ MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : - 1 },
9393 },
9494 },
9595 },
@@ -108,7 +108,7 @@ func TestHandle(t *testing.T) {
108108 Strategy : placementv1beta1.RolloutStrategy {
109109 Type : placementv1beta1 .RollingUpdateRolloutStrategyType ,
110110 RollingUpdate : & placementv1beta1.RollingUpdateConfig {
111- MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : 0 },
111+ MaxUnavailable : & intstr.IntOrString {Type : intstr .Int , IntVal : - 1 },
112112 },
113113 },
114114 },
0 commit comments