mirror of
https://github.com/containers/skopeo.git
synced 2026-02-21 06:32:10 +00:00
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
29 lines
867 B
Bash
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" != "" ]
|
|
}
|