mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 02:51:02 +00:00
Add system tests for the following subcommands and flags: - skopeo copy --format - skopeo copy --additional-tag - skopeo copy --dest-shared-blob-dir - skopeo copy --src-shared-blob-dir - skopeo inspect --tls-verify --cert-dir - skopeo delete --tls-verify --cert-dir - skopeo copy --dest-creds - skopeo copy --src-creds - skopeo copy --authfile - skopeo inspect --authfile - skopeo delete --authfile - skopeo copy --remove-signatures - skopeo standalone-sign - skopeo standalone-verify - skopeo manifest-digest Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
#!/usr/bin/env bats
|
|
#
|
|
# Confirm that skopeo will push to and pull from a local
|
|
# registry with locally-created TLS certificates.
|
|
#
|
|
load helpers
|
|
|
|
function setup() {
|
|
standard_setup
|
|
|
|
start_registry --with-cert --enable-delete=true reg
|
|
}
|
|
|
|
@test "local registry, with cert" {
|
|
# Push to local registry...
|
|
run_skopeo copy --dest-cert-dir=$TESTDIR/client-auth \
|
|
docker://quay.io/libpod/busybox:latest \
|
|
docker://localhost:5000/busybox:unsigned
|
|
|
|
# ...and pull it back out
|
|
run_skopeo copy --src-cert-dir=$TESTDIR/client-auth \
|
|
docker://localhost:5000/busybox:unsigned \
|
|
dir:$TESTDIR/extracted
|
|
|
|
# inspect with cert
|
|
run_skopeo inspect --cert-dir=$TESTDIR/client-auth \
|
|
docker://localhost:5000/busybox:unsigned
|
|
expect_output --substring "localhost:5000/busybox"
|
|
|
|
# delete with cert
|
|
run_skopeo delete --cert-dir=$TESTDIR/client-auth \
|
|
docker://localhost:5000/busybox:unsigned
|
|
}
|
|
|
|
teardown() {
|
|
podman rm -f reg
|
|
|
|
standard_teardown
|
|
}
|
|
|
|
# vim: filetype=sh
|