Update tests to prepare for graceful deletion

For cases where we want to immediately cleanup the pod, start using
gracePeriod 0 in test cases.
This commit is contained in:
Clayton Coleman
2015-08-19 22:09:57 -04:00
parent 3fce3433d9
commit 9267f829eb
9 changed files with 47 additions and 40 deletions

View File

@@ -232,7 +232,7 @@ var deleteNow string = `
{
"kind": "DeleteOptions",
"apiVersion": "` + testapi.Version() + `",
"gracePeriodSeconds": null%s
"gracePeriodSeconds": 0%s
}
`

View File

@@ -277,7 +277,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore
t.Logf("Test %d: Pod got scheduled on a schedulable node", i)
}
err = restClient.Pods(api.NamespaceDefault).Delete(myPod.Name, nil)
err = restClient.Pods(api.NamespaceDefault).Delete(myPod.Name, api.NewDeleteOptions(0))
if err != nil {
t.Errorf("Failed to delete pod: %v", err)
}