controller expectations for deletion can be met by 404

This commit is contained in:
David Eads
2018-08-24 09:03:51 -04:00
parent 963adda7f9
commit a2ee93b531
2 changed files with 15 additions and 1 deletions

View File

@@ -314,6 +314,19 @@ func TestCreatePods(t *testing.T) {
"Body: %s", fakeHandler.RequestBody)
}
func TestDeletePodsAllowsMissing(t *testing.T) {
fakeClient := fake.NewSimpleClientset()
podControl := RealPodControl{
KubeClient: fakeClient,
Recorder: &record.FakeRecorder{},
}
controllerSpec := newReplicationController(1)
err := podControl.DeletePod("namespace-name", "podName", controllerSpec)
assert.NoError(t, err, "unexpected error: %v", err)
}
func TestActivePodFiltering(t *testing.T) {
// This rc is not needed by the test, only the newPodList to give the pods labels/a namespace.
rc := newReplicationController(0)