mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
Merge pull request #27142 from nothiaki/feat-artifact-rm-ignore
Feat artifact rm ignore
This commit is contained in:
@@ -257,6 +257,22 @@ var _ = Describe("Podman artifact", func() {
|
||||
// There should be no artifacts in the store
|
||||
rmAll := podmanTest.PodmanExitCleanly("artifact", "ls", "--noheading")
|
||||
Expect(rmAll.OutputToString()).To(BeEmpty())
|
||||
|
||||
// Trying to remove an artifact that does not exist should pass with -i
|
||||
podmanTest.PodmanExitCleanly("artifact", "rm", "-i", "foobar")
|
||||
|
||||
// Add an artifact to test remove with --ignore flag
|
||||
artifact3File, err := createArtifactFile(4192)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
artifact3Name := "localhost/test/artifact3"
|
||||
_ = podmanTest.PodmanExitCleanly("artifact", "add", artifact3Name, artifact3File)
|
||||
|
||||
// Trying to remove an existing artifact should also pass with -i
|
||||
podmanTest.PodmanExitCleanly("artifact", "rm", "-i", artifact3Name)
|
||||
|
||||
// There should be no artifacts in the store at this point
|
||||
rmAll = podmanTest.PodmanExitCleanly("artifact", "ls", "--noheading")
|
||||
Expect(rmAll.OutputToString()).To(BeEmpty())
|
||||
})
|
||||
|
||||
It("podman artifact inspect with full or partial digest", func() {
|
||||
|
||||
Reference in New Issue
Block a user