diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-08-22 17:45:44 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-27 13:26:28 +0000 |
commit | 663ee91eec01706008046c1df2c307716f9288db (patch) | |
tree | f789c4e681e51c74a29b9c71df8db73806f7f751 /test | |
parent | 90e93e66b0906e59efe3025d801a0e122bd4c42e (diff) | |
download | podman-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')
-rw-r--r-- | test/e2e/run_test.go | 30 |
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()) + }) }) |