summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-04-30 08:26:31 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-30 21:07:59 +0000
commit9924956dc88bf91a4d0bf09249ffb4cb960dee01 (patch)
tree19c45c97a8af4ef47a65d28dcbf9a6ce5e2d1f77 /test/e2e
parentc8c39779a7919e78a97b97394930080885a41425 (diff)
downloadpodman-9924956dc88bf91a4d0bf09249ffb4cb960dee01.tar.gz
podman-9924956dc88bf91a4d0bf09249ffb4cb960dee01.tar.bz2
podman-9924956dc88bf91a4d0bf09249ffb4cb960dee01.zip
do not commit default volumes from container
when performing a container commit, we should not add the default list of volumes for a container to the resulting image. it will cause the resulting image to crash when run subsequently. Signed-off-by: baude <bbaude@redhat.com> Closes: #699 Approved by: mheon
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/commit_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index 30f208f6f..f95a41896 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -110,4 +110,26 @@ var _ = Describe("Podman commit", func() {
check.WaitWithDefaultTimeout()
Expect(check.ExitCode()).To(Equal(0))
})
+
+ It("podman commit with volume mounts", 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", "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].ContainerConfig.Volumes["/tmp"]
+ Expect(ok).To(BeTrue())
+
+ r := podmanTest.Podman([]string{"run", "newimage"})
+ r.WaitWithDefaultTimeout()
+ Expect(r.ExitCode()).To(Equal(0))
+ })
+
})