mirror of https://github.com/containers/podman.git
commit
09b8831fa2
|
@ -273,7 +273,10 @@ var _ = Describe("Podman manifest", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("authenticated push", func() {
|
It("authenticated push", func() {
|
||||||
registry, err := podmanRegistry.Start()
|
registryOptions := &podmanRegistry.Options{
|
||||||
|
Image: "docker-archive:" + imageTarPath(registry),
|
||||||
|
}
|
||||||
|
registry, err := podmanRegistry.StartWithOptions(registryOptions)
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
|
||||||
|
|
||||||
. "github.com/containers/podman/v4/test/utils"
|
. "github.com/containers/podman/v4/test/utils"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
|
@ -53,23 +52,29 @@ var _ = Describe("Podman pull", func() {
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull from docker a not existing image", func() {
|
It("podman pull bogus image", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "ibetthisdoesntexistthere:foo"})
|
session := podmanTest.Podman([]string{"pull", "quay.io/ibetthis/doesntexistthere:foo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).To(ExitWithError())
|
Expect(session).To(ExitWithError())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull from docker with tag", func() {
|
It("podman pull with tag --quiet", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2:20200210"})
|
session := podmanTest.Podman([]string{"pull", "-q", "quay.io/libpod/testdigest_v2s2:20200210"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
|
quietOutput := session.OutputToString()
|
||||||
|
|
||||||
|
session = podmanTest.Podman([]string{"inspect", "testdigest_v2s2:20200210", "--format", "{{.ID}}"})
|
||||||
|
session.WaitWithDefaultTimeout()
|
||||||
|
Expect(session).Should(Exit(0))
|
||||||
|
Expect(session.OutputToString()).To(Equal(quietOutput))
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"rmi", "testdigest_v2s2:20200210"})
|
session = podmanTest.Podman([]string{"rmi", "testdigest_v2s2:20200210"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull from docker without tag", func() {
|
It("podman pull without tag", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2"})
|
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
|
@ -79,26 +84,6 @@ var _ = Describe("Podman pull", func() {
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull from alternate registry with tag", func() {
|
|
||||||
session := podmanTest.Podman([]string{"pull", cirros})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"rmi", cirros})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull from alternate registry without tag", func() {
|
|
||||||
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/cirros"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"rmi", "quay.io/libpod/cirros"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull by digest", func() {
|
It("podman pull by digest", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
|
session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
@ -114,6 +99,23 @@ var _ = Describe("Podman pull", func() {
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
It("podman pull check all tags", func() {
|
||||||
|
session := podmanTest.Podman([]string{"pull", "--all-tags", "quay.io/libpod/testdigest_v2s2"})
|
||||||
|
session.WaitWithDefaultTimeout()
|
||||||
|
Expect(session).Should(Exit(0))
|
||||||
|
|
||||||
|
session = podmanTest.Podman([]string{"images"})
|
||||||
|
session.WaitWithDefaultTimeout()
|
||||||
|
Expect(session).Should(Exit(0))
|
||||||
|
Expect(len(session.OutputToStringArray())).To(BeNumerically(">=", 2), "Expected at least two images")
|
||||||
|
})
|
||||||
|
|
||||||
|
It("podman pull from docker with nonexistent --authfile", func() {
|
||||||
|
session := podmanTest.Podman([]string{"pull", "--authfile", "/tmp/nonexistent", ALPINE})
|
||||||
|
session.WaitWithDefaultTimeout()
|
||||||
|
Expect(session).To(ExitWithError())
|
||||||
|
})
|
||||||
|
|
||||||
It("podman pull by digest (image list)", func() {
|
It("podman pull by digest (image list)", func() {
|
||||||
session := podmanTest.Podman([]string{"pull", "--arch=arm64", ALPINELISTDIGEST})
|
session := podmanTest.Podman([]string{"pull", "--arch=arm64", ALPINELISTDIGEST})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
@ -251,12 +253,6 @@ var _ = Describe("Podman pull", func() {
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull bogus image", func() {
|
|
||||||
session := podmanTest.Podman([]string{"pull", "umohnani/get-started"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).To(ExitWithError())
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull from docker-archive", func() {
|
It("podman pull from docker-archive", func() {
|
||||||
SkipIfRemote("podman-remote does not support pulling from docker-archive")
|
SkipIfRemote("podman-remote does not support pulling from docker-archive")
|
||||||
|
|
||||||
|
@ -388,42 +384,6 @@ var _ = Describe("Podman pull", func() {
|
||||||
Expect(session.LineInOutputContainsTag(filepath.Join("localhost", dirpath), "latest")).To(BeTrue())
|
Expect(session.LineInOutputContainsTag(filepath.Join("localhost", dirpath), "latest")).To(BeTrue())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman pull check quiet", func() {
|
|
||||||
err := podmanTest.RestoreArtifact(ALPINE)
|
|
||||||
Expect(err).ToNot(HaveOccurred())
|
|
||||||
setup := podmanTest.Podman([]string{"images", ALPINE, "-q", "--no-trunc"})
|
|
||||||
setup.WaitWithDefaultTimeout()
|
|
||||||
Expect(setup).Should(Exit(0))
|
|
||||||
shortImageID := strings.Split(setup.OutputToString(), ":")[1]
|
|
||||||
|
|
||||||
rmi := podmanTest.Podman([]string{"rmi", ALPINE})
|
|
||||||
rmi.WaitWithDefaultTimeout()
|
|
||||||
Expect(rmi).Should(Exit(0))
|
|
||||||
|
|
||||||
pull := podmanTest.Podman([]string{"pull", "-q", ALPINE})
|
|
||||||
pull.WaitWithDefaultTimeout()
|
|
||||||
Expect(pull).Should(Exit(0))
|
|
||||||
|
|
||||||
Expect(pull.OutputToString()).To(ContainSubstring(shortImageID))
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull check all tags", func() {
|
|
||||||
session := podmanTest.Podman([]string{"pull", "--all-tags", "k8s.gcr.io/pause"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"images"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).Should(Exit(0))
|
|
||||||
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 4))
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull from docker with nonexistent --authfile", func() {
|
|
||||||
session := podmanTest.Podman([]string{"pull", "--authfile", "/tmp/nonexistent", ALPINE})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session).To(ExitWithError())
|
|
||||||
})
|
|
||||||
|
|
||||||
It("podman pull + inspect from unqualified-search registry", func() {
|
It("podman pull + inspect from unqualified-search registry", func() {
|
||||||
// Regression test for #6381:
|
// Regression test for #6381:
|
||||||
// Make sure that `pull shortname` and `inspect shortname`
|
// Make sure that `pull shortname` and `inspect shortname`
|
||||||
|
|
Loading…
Reference in New Issue