summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-30 14:00:44 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-30 17:42:15 -0400
commit0785d6af157f815b93b2c7b105dbece2dbb7fefa (patch)
tree94c3fc2732b16624edbec6156ef4384a4a305d82 /test/e2e
parent4132b71478c486b3f4eff6a344ee1b2defbab86f (diff)
downloadpodman-0785d6af157f815b93b2c7b105dbece2dbb7fefa.tar.gz
podman-0785d6af157f815b93b2c7b105dbece2dbb7fefa.tar.bz2
podman-0785d6af157f815b93b2c7b105dbece2dbb7fefa.zip
Handle single character images
Currently you can only specify multiple character for image names when executing podman-remote commit podman-remote commit a b Will complete, but will save the image without a name. podman-remote commit a bb Works. This PR fixes and now returns an error if the user doees not specify an image name to commit to. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/commit_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index 568ee080d..c122ce50f 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -49,6 +49,21 @@ var _ = Describe("Podman commit", func() {
Expect(StringInSlice("foobar.com/test1-image:latest", data[0].RepoTags)).To(BeTrue())
})
+ It("podman commit single letter container", func() {
+ _, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ session := podmanTest.Podman([]string{"commit", "test1", "a"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ check := podmanTest.Podman([]string{"inspect", "localhost/a:latest"})
+ check.WaitWithDefaultTimeout()
+ data := check.InspectImageJSON()
+ Expect(StringInSlice("localhost/a:latest", data[0].RepoTags)).To(BeTrue())
+ })
+
It("podman container commit container", func() {
_, ec, _ := podmanTest.RunLsContainer("test1")
Expect(ec).To(Equal(0))