mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
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:
parent
acd97b42f3
commit
2430c48c10
@ -486,8 +486,12 @@ func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64,
|
|||||||
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
|
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Failf("Failed to create client pod: %v", err)
|
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))
|
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(f.ClientSet, clientPod))
|
||||||
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
|
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user