aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-30 13:54:02 +0000
committerGitHub <noreply@github.com>2022-06-30 13:54:02 +0000
commitaa109ae0f058060466b61d01571e37b7cc718b9a (patch)
treea06c4d46502c889f468e5ef3f1ec693331230662 /test
parent3426d56b92be2ac1c3cc62fc578e9cb6d64aca81 (diff)
parent7bbfb3eb0d9c711332b5d96963bbc8db28bf6115 (diff)
downloadpodman-aa109ae0f058060466b61d01571e37b7cc718b9a.tar.gz
podman-aa109ae0f058060466b61d01571e37b7cc718b9a.tar.bz2
podman-aa109ae0f058060466b61d01571e37b7cc718b9a.zip
Merge pull request #14783 from flouthoc/api-image-lookup-manifest
api,images: add support for `LookupManifest` to `Image removal` REST API
Diffstat (limited to 'test')
-rw-r--r--test/e2e/manifest_test.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go
index 2fffc9118..06dbbb539 100644
--- a/test/e2e/manifest_test.go
+++ b/test/e2e/manifest_test.go
@@ -405,4 +405,32 @@ var _ = Describe("Podman manifest", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
+
+ It("manifest rm should not remove image and should be able to remove tagged manifest list", func() {
+ // manifest rm should fail with `image is not a manifest list`
+ session := podmanTest.Podman([]string{"manifest", "rm", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(125))
+ Expect(session.ErrorToString()).To(ContainSubstring("image is not a manifest list"))
+
+ manifestName := "testmanifest:sometag"
+ session = podmanTest.Podman([]string{"manifest", "create", manifestName})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ // verify if manifest exists
+ session = podmanTest.Podman([]string{"manifest", "exists", manifestName})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ // manifest rm should be able to remove tagged manifest list
+ session = podmanTest.Podman([]string{"manifest", "rm", manifestName})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ // verify that manifest should not exist
+ session = podmanTest.Podman([]string{"manifest", "exists", manifestName})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(1))
+ })
})