summaryrefslogtreecommitdiff
path: root/pkg/bindings/test/manifests_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-06 03:41:09 +0200
committerGitHub <noreply@github.com>2020-05-06 03:41:09 +0200
commit7885b5cd52e77d16b846f0d6b981995df6072166 (patch)
tree435988cc38b931c0538ee45a7eaf3434a24ca681 /pkg/bindings/test/manifests_test.go
parent864aec8bb011a7a42cf0a2faca39f6e27118b805 (diff)
parent1090d4d5d99410b5433330516a4ea3f5e5a27375 (diff)
downloadpodman-7885b5cd52e77d16b846f0d6b981995df6072166.tar.gz
podman-7885b5cd52e77d16b846f0d6b981995df6072166.tar.bz2
podman-7885b5cd52e77d16b846f0d6b981995df6072166.zip
Merge pull request #6063 from QiWang19/manifest-annotate
manifest annotate
Diffstat (limited to 'pkg/bindings/test/manifests_test.go')
-rw-r--r--pkg/bindings/test/manifests_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/bindings/test/manifests_test.go b/pkg/bindings/test/manifests_test.go
index 4987dfe5b..ddb75865c 100644
--- a/pkg/bindings/test/manifests_test.go
+++ b/pkg/bindings/test/manifests_test.go
@@ -118,6 +118,26 @@ var _ = Describe("Podman containers ", func() {
Expect(len(data.Manifests)).To(BeZero())
})
+ It("annotate manifest", func() {
+ id, err := manifests.Create(bt.conn, []string{"quay.io/libpod/foobar:latest"}, []string{}, nil)
+ Expect(err).To(BeNil())
+ opts := image.ManifestAddOpts{Images: []string{"docker.io/library/alpine:latest"}}
+
+ _, err = manifests.Add(bt.conn, id, opts)
+ Expect(err).To(BeNil())
+ data, err := manifests.Inspect(bt.conn, id)
+ Expect(err).To(BeNil())
+ Expect(len(data.Manifests)).To(BeNumerically("==", 1))
+ digest := data.Manifests[0].Digest.String()
+ annoOpts := image.ManifestAnnotateOpts{OS: "foo"}
+ _, err = manifests.Annotate(bt.conn, id, digest, annoOpts)
+ Expect(err).To(BeNil())
+ list, err := manifests.Inspect(bt.conn, id)
+ Expect(err).To(BeNil())
+ Expect(len(list.Manifests)).To(BeNumerically("==", 1))
+ Expect(list.Manifests[0].Platform.OS).To(Equal("foo"))
+ })
+
It("push manifest", func() {
Skip("TODO")
})