mirror of
https://github.com/containers/skopeo.git
synced 2025-10-21 02:45:56 +00:00
Replace shortnames with FQINs; this should allow tests to run regardless of the state of registries.conf. And, fix one broken new test that invoked 'jq' (without dot). This usage works in Fedora, but not in RHEL. Signed-off-by: Ed Santiago <santiago@redhat.com>
38 lines
824 B
Bash
38 lines
824 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://docker.io/library/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
|