diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-04-11 09:59:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 09:59:52 -0700 |
commit | 745993b592903544e5a3b38ae9336e65c56874f4 (patch) | |
tree | 87fbc14c5e815a56100d38d8e6d62f4186bd781b /test/e2e | |
parent | ab259987ee4920e549a863ab3b7055877d6f61d7 (diff) | |
parent | aef09ce031d169a7a5c0c8460ee6ec231bbf5a11 (diff) | |
download | podman-745993b592903544e5a3b38ae9336e65c56874f4.tar.gz podman-745993b592903544e5a3b38ae9336e65c56874f4.tar.bz2 podman-745993b592903544e5a3b38ae9336e65c56874f4.zip |
Merge pull request #2895 from mheon/commit_no_default_include_volumes
Add --include-volumes flag to 'podman commit'
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/commit_test.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go index fe4ae64cf..93e1ea7af 100644 --- a/test/e2e/commit_test.go +++ b/test/e2e/commit_test.go @@ -131,7 +131,7 @@ var _ = Describe("Podman commit", func() { Expect(check.ExitCode()).To(Equal(0)) }) - It("podman commit with volume mounts", func() { + It("podman commit with volumes mounts and no include-volumes", func() { s := podmanTest.Podman([]string{"run", "--name", "test1", "-v", "/tmp:/foo", "alpine", "date"}) s.WaitWithDefaultTimeout() Expect(s.ExitCode()).To(Equal(0)) @@ -145,6 +145,23 @@ var _ = Describe("Podman commit", func() { Expect(inspect.ExitCode()).To(Equal(0)) image := inspect.InspectImageJSON() _, ok := image[0].Config.Volumes["/foo"] + Expect(ok).To(BeFalse()) + }) + + It("podman commit with volume mounts and --include-volumes", func() { + s := podmanTest.Podman([]string{"run", "--name", "test1", "-v", "/tmp:/foo", "alpine", "date"}) + s.WaitWithDefaultTimeout() + Expect(s.ExitCode()).To(Equal(0)) + + c := podmanTest.Podman([]string{"commit", "--include-volumes", "test1", "newimage"}) + c.WaitWithDefaultTimeout() + Expect(c.ExitCode()).To(Equal(0)) + + inspect := podmanTest.Podman([]string{"inspect", "newimage"}) + inspect.WaitWithDefaultTimeout() + Expect(inspect.ExitCode()).To(Equal(0)) + image := inspect.InspectImageJSON() + _, ok := image[0].Config.Volumes["/foo"] Expect(ok).To(BeTrue()) r := podmanTest.Podman([]string{"run", "newimage"}) |