e2e: fix run_volume_test

When SELinux is running in enforcing mode,
this test needs to add an suffix :Z to the volume mount.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda
2023-01-04 15:34:37 +09:00
parent b2da34e57d
commit fb73121c4c

View File

@ -159,7 +159,7 @@ var _ = Describe("Podman run with volumes", func() {
Expect(err).ToNot(HaveOccurred(), "os.Create(testfile)") Expect(err).ToNot(HaveOccurred(), "os.Create(testfile)")
f.Close() f.Close()
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
session := podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:/data", mountPath), REDIS_IMAGE, "ls", "/data/test1"}) session := podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:/data:Z", mountPath), REDIS_IMAGE, "ls", "/data/test1"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
}) })