Skip to content

Commit 701df4a

Browse files
nbspsemicolondustymabe
authored andcommitted
tests/podman: podman rmi output check
podman rmi only produces two lines of output without a -q option that might produce a "docker-ish" output displaying only the abbreviated image ID. To simplify rmi success checking, indirect testing using the expected ID output was replaced with a direct reference to the image name. Bash piping with grep was also removed in favor of a single command.
1 parent 456beae commit 701df4a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mantle/kola/tests/podman/podman.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,9 @@ func podmanWorkflow(c cluster.TestCluster) {
216216
// Test: Delete container
217217
c.Run("delete", func(c cluster.TestCluster) {
218218
cmd := fmt.Sprintf("sudo podman rmi %s", image)
219-
out := c.MustSSH(m, cmd)
220-
imageID := string(out)
219+
c.MustSSH(m, cmd)
221220

222-
cmd = fmt.Sprintf("sudo podman images | grep %s", imageID)
221+
cmd = fmt.Sprintf("sudo podman image exists %s", image)
223222
out, err := c.SSH(m, cmd)
224223
if err == nil {
225224
c.Fatalf("Image should be deleted but found %s", string(out))

0 commit comments

Comments
 (0)