mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
Merge pull request #18395 from flouthoc/manifest-push-merge-dest
manifest, push: use `source` as `destination` if not specified
This commit is contained in:
@@ -46,7 +46,7 @@ var _ = Describe("Podman manifest", func() {
|
||||
f := CurrentGinkgoTestDescription()
|
||||
processTestResult(f)
|
||||
})
|
||||
It("create w/o image", func() {
|
||||
It("create w/o image and attempt push w/o dest", func() {
|
||||
for _, amend := range []string{"--amend", "-a"} {
|
||||
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@@ -56,6 +56,13 @@ var _ = Describe("Podman manifest", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).To(ExitWithError())
|
||||
|
||||
session = podmanTest.Podman([]string{"manifest", "push", "--all", "foo"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).To(ExitWithError())
|
||||
// Push should actually fail since its not valid registry
|
||||
Expect(session.ErrorToString()).To(ContainSubstring("requested access to the resource is denied"))
|
||||
Expect(session.OutputToString()).To(Not(ContainSubstring("accepts 2 arg(s), received 1")))
|
||||
|
||||
session = podmanTest.Podman([]string{"manifest", "create", amend, "foo"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
@@ -313,6 +313,16 @@ var _ = Describe("Podman push", func() {
|
||||
push.WaitWithDefaultTimeout()
|
||||
Expect(push).Should(Exit(0))
|
||||
Expect(push.ErrorToString()).To(ContainSubstring("Writing manifest to image destination"))
|
||||
|
||||
// create and push manifest
|
||||
session = podmanTest.Podman([]string{"manifest", "create", "localhost:5000/manifesttest"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"manifest", "push", "--creds=podmantest:test", "--tls-verify=false", "--all", "localhost:5000/manifesttest"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.ErrorToString()).To(ContainSubstring("Writing manifest list to image destination"))
|
||||
})
|
||||
|
||||
It("podman push and encrypt to oci", func() {
|
||||
|
||||
Reference in New Issue
Block a user