@@ -40,13 +40,13 @@ func TestReconcile(t *testing.T) {
4040 Labels : map [string ]string {label .ClusterNameLabelName : "cluster" , commonv1 .TypeLabelName : label .Type },
4141 },
4242 Spec : policyv1.PodDisruptionBudgetSpec {
43- MinAvailable : intStrPtr (intstr .FromInt (3 )),
43+ MaxUnavailable : intStrPtr (intstr .FromInt (0 )),
4444 Selector : & metav1.LabelSelector {
4545 MatchLabels : map [string ]string {
4646 label .ClusterNameLabelName : "cluster" ,
4747 },
4848 },
49- MaxUnavailable : nil ,
49+ MinAvailable : nil ,
5050 },
5151 }
5252 }
@@ -79,7 +79,7 @@ func TestReconcile(t *testing.T) {
7979 wantPDB : defaultPDB (),
8080 },
8181 {
82- name : "pdb needs a MinAvailable update" ,
82+ name : "pdb doesn't need a MaxUnavailable update" ,
8383 args : args {
8484 initObjs : []client.Object {defaultPDB ()},
8585 es : defaultEs ,
@@ -92,13 +92,13 @@ func TestReconcile(t *testing.T) {
9292 Labels : map [string ]string {label .ClusterNameLabelName : "cluster" , commonv1 .TypeLabelName : label .Type },
9393 },
9494 Spec : policyv1.PodDisruptionBudgetSpec {
95- MinAvailable : intStrPtr (intstr .FromInt (5 )),
95+ MaxUnavailable : intStrPtr (intstr .FromInt (0 )),
9696 Selector : & metav1.LabelSelector {
9797 MatchLabels : map [string ]string {
9898 label .ClusterNameLabelName : "cluster" ,
9999 },
100100 },
101- MaxUnavailable : nil ,
101+ MinAvailable : nil ,
102102 },
103103 },
104104 },
@@ -196,13 +196,13 @@ func Test_expectedPDB(t *testing.T) {
196196 Labels : map [string ]string {label .ClusterNameLabelName : "cluster" , commonv1 .TypeLabelName : label .Type },
197197 },
198198 Spec : policyv1.PodDisruptionBudgetSpec {
199- MinAvailable : intStrPtr (intstr .FromInt (3 )),
199+ MaxUnavailable : intStrPtr (intstr .FromInt (0 )),
200200 Selector : & metav1.LabelSelector {
201201 MatchLabels : map [string ]string {
202202 label .ClusterNameLabelName : "cluster" ,
203203 },
204204 },
205- MaxUnavailable : nil ,
205+ MinAvailable : nil ,
206206 },
207207 },
208208 },
@@ -227,13 +227,13 @@ func Test_expectedPDB(t *testing.T) {
227227 Labels : map [string ]string {"a" : "b" , "c" : "d" , label .ClusterNameLabelName : "cluster" , commonv1 .TypeLabelName : label .Type },
228228 },
229229 Spec : policyv1.PodDisruptionBudgetSpec {
230- MinAvailable : intStrPtr (intstr .FromInt (3 )),
230+ MaxUnavailable : intStrPtr (intstr .FromInt (0 )),
231231 Selector : & metav1.LabelSelector {
232232 MatchLabels : map [string ]string {
233233 label .ClusterNameLabelName : "cluster" ,
234234 },
235235 },
236- MaxUnavailable : nil ,
236+ MinAvailable : nil ,
237237 },
238238 },
239239 },
0 commit comments