Combine statefulset burst and monotonic scaling tests

Use subtests to avoid duplicating entire suite of control logic.
This commit is contained in:
Clayton Coleman
2017-04-25 00:40:45 -04:00
parent 2861ae5eb9
commit 20d45af694
3 changed files with 221 additions and 231 deletions

View File

@@ -640,7 +640,7 @@ func scaleUpStatefulSetController(set *apps.StatefulSet, ssc *StatefulSetControl
pod = getPodAtOrdinal(pods, ord)
ssc.updatePod(&prev, pod)
fakeWorker(ssc)
if err := assertInvariants(set, spc); err != nil {
if err := assertMonotonicInvariants(set, spc); err != nil {
return err
}
if obj, _, err := spc.setsIndexer.Get(set); err != nil {
@@ -650,7 +650,7 @@ func scaleUpStatefulSetController(set *apps.StatefulSet, ssc *StatefulSetControl
}
}
return assertInvariants(set, spc)
return assertMonotonicInvariants(set, spc)
}
func scaleDownStatefulSetController(set *apps.StatefulSet, ssc *StatefulSetController, spc *fakeStatefulPodControl) error {
@@ -692,5 +692,5 @@ func scaleDownStatefulSetController(set *apps.StatefulSet, ssc *StatefulSetContr
set = obj.(*apps.StatefulSet)
}
}
return assertInvariants(set, spc)
return assertMonotonicInvariants(set, spc)
}