diff options
author | Aditya R <arajan@redhat.com> | 2022-06-27 15:47:12 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-06-29 12:41:57 +0530 |
commit | 5790caaef769ff3dcf8b9ebf43fb6c61d17618bf (patch) | |
tree | e51ee069bc2bf1f1f4cef44ea7d3d7e689b27184 /pkg/bindings/test | |
parent | 324435a6486c050de4f06baaf2a3ff7c6b37071f (diff) | |
download | podman-5790caaef769ff3dcf8b9ebf43fb6c61d17618bf.tar.gz podman-5790caaef769ff3dcf8b9ebf43fb6c61d17618bf.tar.bz2 podman-5790caaef769ff3dcf8b9ebf43fb6c61d17618bf.zip |
bindings: Add support for Delete in pkg/bingings/manifest
Bindings already support `Remove` which removes a manifest from the list
following function adds support for removing entire manifest for local
storage.
Similar functionality can be also used indirectly by using `Remove` defined in
image bindings
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'pkg/bindings/test')
-rw-r--r-- | pkg/bindings/test/manifests_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/bindings/test/manifests_test.go b/pkg/bindings/test/manifests_test.go index e6c93817d..6a34ef5a6 100644 --- a/pkg/bindings/test/manifests_test.go +++ b/pkg/bindings/test/manifests_test.go @@ -62,6 +62,19 @@ var _ = Describe("podman manifest", func() { Expect(len(list.Manifests)).To(BeNumerically("==", 1)) }) + It("delete manifest", func() { + id, err := manifests.Create(bt.conn, "quay.io/libpod/foobar:latest", []string{}, nil) + Expect(err).ToNot(HaveOccurred(), err) + list, err := manifests.Inspect(bt.conn, id, nil) + Expect(err).ToNot(HaveOccurred()) + + Expect(len(list.Manifests)).To(BeZero()) + + removeReport, err := manifests.Delete(bt.conn, "quay.io/libpod/foobar:latest") + Expect(err).ToNot(HaveOccurred()) + Expect(len(removeReport.Deleted)).To(BeNumerically("==", 1)) + }) + It("inspect", func() { _, err := manifests.Inspect(bt.conn, "larry", nil) Expect(err).To(HaveOccurred()) |