mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
Allow push/save without image reference
If the user uses the image ID when saving to either docker-archive or oci-archive, then do not save a reference in the manifest/index.json. If the user chooses to push without an image reference, i.e <transport>:<path> it should be valid and succeed. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #782 Approved by: rhatdan
This commit is contained in:
@ -206,4 +206,22 @@ var _ = Describe("Podman push", func() {
|
||||
Expect(clean.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("podman push to docker-archive no reference", func() {
|
||||
session := podmanTest.Podman([]string{"push", ALPINE, "docker-archive:/tmp/alp"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
clean := podmanTest.SystemExec("rm", []string{"/tmp/alp"})
|
||||
clean.WaitWithDefaultTimeout()
|
||||
Expect(clean.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("podman push to oci-archive no reference", func() {
|
||||
session := podmanTest.Podman([]string{"push", ALPINE, "oci-archive:/tmp/alp-oci"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
clean := podmanTest.SystemExec("rm", []string{"/tmp/alp-oci"})
|
||||
clean.WaitWithDefaultTimeout()
|
||||
Expect(clean.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user