summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-08-22 17:45:44 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-27 13:26:28 +0000
commit663ee91eec01706008046c1df2c307716f9288db (patch)
treef789c4e681e51c74a29b9c71df8db73806f7f751 /test/e2e/run_test.go
parent90e93e66b0906e59efe3025d801a0e122bd4c42e (diff)
downloadpodman-663ee91eec01706008046c1df2c307716f9288db.tar.gz
podman-663ee91eec01706008046c1df2c307716f9288db.tar.bz2
podman-663ee91eec01706008046c1df2c307716f9288db.zip
Fix Mount Propagation
Default mount propagation inside of containes should be private Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1305 Approved by: mheon
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 7bba1e31e..e437d47d3 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -566,4 +566,34 @@ USER mail`
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
+
+ It("podman run findmnt nothing shared", func() {
+ vol1 := filepath.Join(podmanTest.TempDir, "vol-test1")
+ err := os.MkdirAll(vol1, 0755)
+ Expect(err).To(BeNil())
+ vol2 := filepath.Join(podmanTest.TempDir, "vol-test2")
+ err = os.MkdirAll(vol2, 0755)
+ Expect(err).To(BeNil())
+
+ session := podmanTest.Podman([]string{"run", "--volume", vol1 + ":/myvol1:z", "--volume", vol2 + ":/myvol2:z", fedoraMinimal, "findmnt", "-o", "TARGET,PROPAGATION"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString("shared")
+ Expect(match).Should(BeFalse())
+ })
+
+ It("podman run findmnt shared", func() {
+ vol1 := filepath.Join(podmanTest.TempDir, "vol-test1")
+ err := os.MkdirAll(vol1, 0755)
+ Expect(err).To(BeNil())
+ vol2 := filepath.Join(podmanTest.TempDir, "vol-test2")
+ err = os.MkdirAll(vol2, 0755)
+ Expect(err).To(BeNil())
+
+ session := podmanTest.Podman([]string{"run", "--volume", vol1 + ":/myvol1:z", "--volume", vol2 + ":/myvol2:shared,z", fedoraMinimal, "findmnt", "-o", "TARGET,PROPAGATION"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString("shared")
+ Expect(match).Should(BeTrue())
+ })
})