@@ -1420,7 +1420,7 @@ func TestTrackResourceAvailability(t *testing.T) {
14201420 expected : manifestNotAvailableYetAction ,
14211421 err : nil ,
14221422 },
1423- "Test PodDisruptionBudget available" : {
1423+ "Test PodDisruptionBudget available (sufficient pods) " : {
14241424 gvr : utils .PodDisruptionBudgetGVR ,
14251425 obj : & unstructured.Unstructured {
14261426 Object : map [string ]interface {}{
@@ -1487,7 +1487,7 @@ func TestTrackResourceAvailability(t *testing.T) {
14871487 expected : manifestNotAvailableYetAction ,
14881488 err : nil ,
14891489 },
1490- "Test PodDisruptionBudget unavailable " : {
1490+ "Test PodDisruptionBudget available (insufficient pods) " : {
14911491 gvr : utils .PodDisruptionBudgetGVR ,
14921492 obj : & unstructured.Unstructured {
14931493 Object : map [string ]interface {}{
@@ -1502,22 +1502,23 @@ func TestTrackResourceAvailability(t *testing.T) {
15021502 "minAvailable" : 1 ,
15031503 },
15041504 "status" : map [string ]interface {}{
1505- "currentHealthy" : 1 ,
1505+ "currentHealthy" : 2 ,
15061506 "desiredHealthy" : 1 ,
15071507 "observedGeneration" : 2 ,
1508- "disruptionsAllowed" : 1 ,
1508+ "disruptionsAllowed" : 0 ,
15091509 "expectedPods" : 1 ,
15101510 "conditions" : []interface {}{
15111511 map [string ]interface {}{
1512- "type" : "DisruptionAllowed" ,
1513- "status" : "False" ,
1514- "reason" : "InsufficientPods" ,
1512+ "type" : "DisruptionAllowed" ,
1513+ "status" : "False" ,
1514+ "reason" : "InsufficientPods" ,
1515+ "observedGeneration" : 2 ,
15151516 },
15161517 },
15171518 },
15181519 },
15191520 },
1520- expected : manifestNotAvailableYetAction ,
1521+ expected : manifestAvailableAction ,
15211522 err : nil ,
15221523 },
15231524 }
0 commit comments