Files
skopeo/tests/inspect.bats
Nalin Dahyabhai 76395efa52 Add an initial "inspect" command
Add an "inspect" command, which can be used to dump the contents of the
Buildah object for a working container, or the starting one we'd get for
a specified image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #109
Approved by: rhatdan
2017-05-19 11:29:12 +00:00

29 lines
867 B
Bash

#!/usr/bin/env bats
load helpers
@test "inspect-json" {
cid=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json scratch)
run buildah --debug=false inspect "$cid"
[ "$status" -eq 0 ]
[ "$output" != "" ]
}
@test "inspect-format" {
cid=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json scratch)
run buildah --debug=false inspect --format '{{.}}' "$cid"
[ "$status" -eq 0 ]
[ "$output" != "" ]
}
@test "inspect-image" {
cid=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json scratch)
buildah commit --signature-policy ${TESTSDIR}/policy.json $cid scratchy-image
run buildah --debug=false inspect --type image scratchy-image
[ "$status" -eq 0 ]
[ "$output" != "" ]
run buildah --debug=false inspect --type image scratchy-image:latest
[ "$status" -eq 0 ]
[ "$output" != "" ]
}