Removing tagged images change in behavior

An image name is really just a tag.  When an image has multiple tags, we should be
able to "delete" the one of its tags without harm. In this case, the "delete' is
really a form of Untag (removing the tag from the image).

If an image has multiple tags and the user tries to delete by ID without force, this
should be denied because when you delete by ID there is no distinguishing it like
image tags.

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

Closes: #528
Approved by: mheon
This commit is contained in:
baude
2018-03-21 13:08:32 -05:00
committed by Atomic Bot
parent 2cc51dbb1c
commit d364d41e1b
6 changed files with 167 additions and 25 deletions

View File

@ -35,20 +35,16 @@ var _ = Describe("Podman push", func() {
session = podmanTest.Podman([]string{"rmi", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Not(Equal(0)))
Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.Podman([]string{"rmi", "busybox:test"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Not(Equal(0)))
session = podmanTest.Podman([]string{"rmi", "-f", "busybox:test"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
// push to oci-archive, docker-archive, and dir are tested in pull_test.go
It("podman push to containers/storage", func() {
It("podman push to dir", func() {
session := podmanTest.Podman([]string{"push", "--remove-signatures", ALPINE, "dir:/tmp/busybox"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))