Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ypu bats tests #2004

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Tests: Add inspect test check steps
Add check steps for inspect with container id and image id.

Signed-off-by: Yiqiao Pu <[email protected]>
  • Loading branch information
ypu authored and edsantiago committed Dec 3, 2019
commit 03be32113263f839a367d0052101cbcb92b20ecb
11 changes: 11 additions & 0 deletions tests/inspect.bats
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ load helpers

[ "$out1" != "" ]
[ "$out1" = "$out2" ]

imageid=$(buildah images -q alpine-image)
containerid=$(buildah containers -q)

out3=$(buildah inspect --format '{{.OCIv1.Config}}' $containerid)
out4=$(buildah inspect --type image --format '{{.OCIv1.Config}}' $imageid)
[ "$out3" = "$out1" ]
[ "$out4" = "$out1" ]

buildah rm $cid
buildah rmi alpine-image alpine
}

@test "inspect-config-is-json" {
Expand Down