Run unit test with DSMaxSurgeFlag enabled and disabled
This commit is contained in:
@@ -847,6 +847,9 @@ func TestDaemonSetPodCreateExpectationsError(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSimpleDaemonSetUpdatesStatusAfterLaunchingPods(t *testing.T) {
|
func TestSimpleDaemonSetUpdatesStatusAfterLaunchingPods(t *testing.T) {
|
||||||
|
dsMaxSurgeFeatureFlags := []bool{false, true}
|
||||||
|
for _, isEnabled := range dsMaxSurgeFeatureFlags {
|
||||||
|
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DaemonSetUpdateSurge, isEnabled)()
|
||||||
for _, strategy := range updateStrategies() {
|
for _, strategy := range updateStrategies() {
|
||||||
ds := newDaemonSet("foo")
|
ds := newDaemonSet("foo")
|
||||||
ds.Spec.UpdateStrategy = *strategy
|
ds.Spec.UpdateStrategy = *strategy
|
||||||
@@ -877,6 +880,7 @@ func TestSimpleDaemonSetUpdatesStatusAfterLaunchingPods(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// DaemonSets should do nothing if there aren't any nodes
|
// DaemonSets should do nothing if there aren't any nodes
|
||||||
func TestNoNodesDoesNothing(t *testing.T) {
|
func TestNoNodesDoesNothing(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user