Delete pod in volume tests

All storage e2e tests should delete pods they use so we can identify issues
on volume cleanup easily.
This commit is contained in:
Jan Safranek 2020-02-11 12:54:38 +01:00
parent acd97b42f3
commit 2430c48c10

View File

@ -486,8 +486,12 @@ func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64,
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
if err != nil {
framework.Failf("Failed to create client pod: %v", err)
}
defer func() {
e2epod.DeletePodOrFail(f.ClientSet, clientPod.Namespace, clientPod.Name)
e2epod.WaitForPodToDisappear(f.ClientSet, clientPod.Namespace, clientPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
}()
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(f.ClientSet, clientPod))
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
}