summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-17 11:54:35 -0500
committerGitHub <noreply@github.com>2022-02-17 11:54:35 -0500
commit27022180b8eed100e94eab9e9279ca1c2b758d64 (patch)
tree60ba688d675af81e23e581de6c25167605007a20 /test
parenta09e94f9ca0a5f8511b5b1e04dc8b6ef2255b061 (diff)
parent1252f9dd3316c6aa61fdf83d8a3a4f9d6463e6b8 (diff)
downloadpodman-27022180b8eed100e94eab9e9279ca1c2b758d64.tar.gz
podman-27022180b8eed100e94eab9e9279ca1c2b758d64.tar.bz2
podman-27022180b8eed100e94eab9e9279ca1c2b758d64.zip
Merge pull request #13264 from mheon/fix_plugin_flake
Fix a potential flake in volume plugins tests
Diffstat (limited to 'test')
-rw-r--r--test/e2e/volume_plugin_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/e2e/volume_plugin_test.go b/test/e2e/volume_plugin_test.go
index 959a44bb8..fd205805d 100644
--- a/test/e2e/volume_plugin_test.go
+++ b/test/e2e/volume_plugin_test.go
@@ -166,11 +166,13 @@ var _ = Describe("Podman volume plugins", func() {
create.WaitWithDefaultTimeout()
Expect(create).Should(Exit(0))
- ctr1 := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", "-v", fmt.Sprintf("%v:/test", volName), ALPINE, "sh", "-c", "touch /test/testfile && echo helloworld > /test/testfile"})
+ ctr1Name := "ctr1"
+ ctr1 := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", "--name", ctr1Name, "-v", fmt.Sprintf("%v:/test", volName), ALPINE, "sh", "-c", "touch /test/testfile && echo helloworld > /test/testfile"})
ctr1.WaitWithDefaultTimeout()
Expect(ctr1).Should(Exit(0))
- ctr2 := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", "-v", fmt.Sprintf("%v:/test", volName), ALPINE, "cat", "/test/testfile"})
+ ctr2Name := "ctr2"
+ ctr2 := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", "--name", ctr2Name, "-v", fmt.Sprintf("%v:/test", volName), ALPINE, "cat", "/test/testfile"})
ctr2.WaitWithDefaultTimeout()
Expect(ctr2).Should(Exit(0))
Expect(ctr2.OutputToString()).To(ContainSubstring("helloworld"))
@@ -178,7 +180,7 @@ var _ = Describe("Podman volume plugins", func() {
// HACK: `volume rm -f` is timing out trying to remove containers using the volume.
// Solution: remove them manually...
// TODO: fix this when I get back
- rmAll := podmanTest.Podman([]string{"rm", "-af"})
+ rmAll := podmanTest.Podman([]string{"rm", "-f", ctr2Name, ctr1Name})
rmAll.WaitWithDefaultTimeout()
Expect(rmAll).Should(Exit(0))
})