mirror of
https://github.com/containers/skopeo.git
synced 2025-04-28 03:10:18 +00:00
Switch to using images from quay.io/libpod instead, where we're not (yet) subject to rate limiting. Completely rewrite one unclear test. The purpose of the test was to test #708, in which 'skopeo inspect --raw' was fixed to be able to inspect images that do not match the current host's os+arch. We now use a fixed test image on quay.io, generated by a new script, whose manifest is pretty unlikely to match our host. Signed-off-by: Ed Santiago <santiago@redhat.com>
38 lines
821 B
Bash
38 lines
821 B
Bash
#!/usr/bin/env bats
|
|
#
|
|
# Copy tests
|
|
#
|
|
|
|
load helpers
|
|
|
|
function setup() {
|
|
standard_setup
|
|
|
|
start_registry --enable-delete=true reg
|
|
}
|
|
|
|
# delete image from registry
|
|
@test "delete: remove image from registry" {
|
|
local remote_image=docker://quay.io/libpod/busybox:latest
|
|
local localimg=docker://localhost:5000/busybox:unsigned
|
|
local output=
|
|
|
|
run_skopeo copy --dest-tls-verify=false $remote_image $localimg
|
|
output=$(run_skopeo inspect --tls-verify=false --raw $localimg)
|
|
echo $output | grep "vnd.docker.distribution.manifest.v2+json"
|
|
|
|
run_skopeo delete --tls-verify=false $localimg
|
|
|
|
# make sure image is removed from registry
|
|
expected_rc=1
|
|
run_skopeo $expected_rc inspect --tls-verify=false $localimg
|
|
}
|
|
|
|
teardown() {
|
|
podman rm -f reg
|
|
|
|
standard_teardown
|
|
}
|
|
|
|
# vim: filetype=sh
|