Return imageid from podman pull

When using podman to pull an image, print the image id after
the image is pulled.

Resolves issue #329

Signed-off-by: baude <bbaude@redhat.com>

Closes: #342
Approved by: rhatdan
This commit is contained in:
baude
2018-02-15 10:33:18 -06:00
committed by Atomic Bot
parent ce7a0171d1
commit 409ed259c6
3 changed files with 34 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"strings"
)
var _ = Describe("Podman pull", func() {
@ -138,4 +139,22 @@ var _ = Describe("Podman pull", func() {
clean := podmanTest.SystemExec("rm", []string{"-fr", "/tmp/podmantestdir"})
clean.WaitWithDefaultTimeout()
})
It("podman pull from local directory", func() {
podmanTest.RestoreArtifact(ALPINE)
setup := podmanTest.Podman([]string{"images", ALPINE, "-q", "--no-trunc"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
shortImageId := strings.Split(setup.OutputToString(), ":")[1]
rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
pull := podmanTest.Podman([]string{"pull", "-q", ALPINE})
pull.WaitWithDefaultTimeout()
Expect(pull.ExitCode()).To(Equal(0))
Expect(pull.OutputToString()).To(ContainSubstring(shortImageId))
})
})