Update kpod load to add signature-policy (2)

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
TomSweeneyRedHat 2017-10-12 20:35:08 -04:00
parent cd1bac5ee0
commit 54a043bfcd
7 changed files with 60 additions and 5 deletions

View file

@ -42,6 +42,23 @@ function teardown() {
[ "$status" -eq 0 ]
}
@test "kpod load oci-archive image with signature-policy" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE
[ "$status" -eq 0 ]
run ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $IMAGE
[ "$status" -eq 0 ]
run ${KPOD_BINARY} $KPOD_OPTIONS rmi $IMAGE
[ "$status" -eq 0 ]
cp /etc/containers/policy.json /tmp
run ${KPOD_BINARY} ${KPOD_OPTIONS} load --signature-policy /tmp/policy.json -i alpine.tar
echo "$output"
[ "$status" -eq 0 ]
rm -f /tmp/policy.json
rm -f alpine.tar
run ${KPOD_BINARY} $KPOD_OPTIONS rmi $IMAGE
[ "$status" -eq 0 ]
}
@test "kpod load using quiet flag" {
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE
echo "$output"