Skip to content

Commit 2430c48

Browse files
committed
Delete pod in volume tests
All storage e2e tests should delete pods they use so we can identify issues on volume cleanup easily.
1 parent acd97b4 commit 2430c48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/framework/volume/fixtures.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,12 @@ func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64,
486486
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
487487
if err != nil {
488488
framework.Failf("Failed to create client pod: %v", err)
489-
490489
}
490+
defer func() {
491+
e2epod.DeletePodOrFail(f.ClientSet, clientPod.Namespace, clientPod.Name)
492+
e2epod.WaitForPodToDisappear(f.ClientSet, clientPod.Namespace, clientPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
493+
}()
494+
491495
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(f.ClientSet, clientPod))
492496
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
493497
}

0 commit comments

Comments
 (0)