Deleting pods assigned to not existing nodes only if

ScheduleDaemonSetPods is enabled.
This commit is contained in:
Krzysztof Jastrzebski
2019-01-31 20:26:19 +01:00
parent 8f1082c6af
commit 0087af78e2
2 changed files with 11 additions and 5 deletions

View File

@@ -2461,7 +2461,11 @@ func TestDeletePodForNotExistingNode(t *testing.T) {
addNodes(manager.nodeStore, 0, 1, nil)
addPods(manager.podStore, "node-0", simpleDaemonSetLabel, ds, 1)
addPods(manager.podStore, "node-1", simpleDaemonSetLabel, ds, 1)
syncAndValidateDaemonSets(t, manager, ds, podControl, 0, 1, 0)
if f {
syncAndValidateDaemonSets(t, manager, ds, podControl, 0, 1, 0)
} else {
syncAndValidateDaemonSets(t, manager, ds, podControl, 0, 0, 0)
}
}
}
}