Files
skopeo/tests/tag.bats
Nalin Dahyabhai 3065ea3d16 Add a "tag" command
Add a "tag" command, for adding names to locally-stored images.

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

Closes: #110
Approved by: rhatdan
2017-05-19 19:59:47 +00:00

20 lines
625 B
Bash

#!/usr/bin/env bats
load helpers
@test "tag" {
cid=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json scratch)
run buildah commit --signature-policy ${TESTSDIR}/policy.json "$cid" scratch-image
[ "$status" -eq 0 ]
run buildah inspect --type image tagged-image
[ "$status" -ne 0 ]
run buildah tag scratch-image tagged-image tagged-also-image named-image
[ "$status" -eq 0 ]
run buildah inspect --type image tagged-image
[ "$status" -eq 0 ]
run buildah inspect --type image tagged-also-image
[ "$status" -eq 0 ]
run buildah inspect --type image named-image
[ "$status" -eq 0 ]
}