e2e: add missing error checks

Not checking for some error conditions must have been an oversight.
This commit is contained in:
Patrick Ohly
2022-12-13 18:07:00 +01:00
parent 8168434f0c
commit 2695ed6a0a
4 changed files with 14 additions and 8 deletions

View File

@@ -542,7 +542,7 @@ func testVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64,
// testVolumeClient might get used more than once per test, therefore
// we have to clean up before returning.
e2epod.DeletePodOrFail(f.ClientSet, clientPod.Namespace, clientPod.Name)
e2epod.WaitForPodToDisappear(f.ClientSet, clientPod.Namespace, clientPod.Name, labels.Everything(), framework.Poll, timeouts.PodDelete)
framework.ExpectNoError(e2epod.WaitForPodToDisappear(f.ClientSet, clientPod.Namespace, clientPod.Name, labels.Everything(), framework.Poll, timeouts.PodDelete))
}()
testVolumeContent(f, clientPod, "", fsGroup, fsType, tests)
@@ -577,7 +577,7 @@ func InjectContent(f *framework.Framework, config TestConfig, fsGroup *int64, fs
// This pod must get deleted before the function returns becaue the test relies on
// the volume not being in use.
e2epod.DeletePodOrFail(f.ClientSet, injectorPod.Namespace, injectorPod.Name)
e2epod.WaitForPodToDisappear(f.ClientSet, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, timeouts.PodDelete)
framework.ExpectNoError(e2epod.WaitForPodToDisappear(f.ClientSet, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, timeouts.PodDelete))
}()
ginkgo.By("Writing text file contents in the container.")