diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-08 14:20:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 14:20:29 +0200 |
commit | 8776a577bf6b86a4e034c54243c5e4a419d14c35 (patch) | |
tree | f4c228599300c89fdd24c051941bf37849960d9f /test/e2e | |
parent | 31bfb12aec6123bd97e84b2067096b09676ca6ac (diff) | |
parent | c0a124ea890cdeefa9330b7ef600f41db76ee3d9 (diff) | |
download | podman-8776a577bf6b86a4e034c54243c5e4a419d14c35.tar.gz podman-8776a577bf6b86a4e034c54243c5e4a419d14c35.tar.bz2 podman-8776a577bf6b86a4e034c54243c5e4a419d14c35.zip |
Merge pull request #3738 from mheon/mount_opts_bools
Allow --ro=[true|false] with mount flag
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_volume_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 9e160e73c..1e0b84310 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -136,4 +136,22 @@ var _ = Describe("Podman run with volumes", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) + + It("podman run with mount flag and boolean options", func() { + mountPath := filepath.Join(podmanTest.TempDir, "secrets") + os.Mkdir(mountPath, 0755) + session := podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,ro=false", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("/run/test rw")) + + session = podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,ro=true", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("/run/test ro")) + + session = podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,ro=true,rw=false", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + }) }) |