load helpers_cloud function setup() { # Verify prerequisites are available if ! verify_prerequisites; then exit 1 fi # Setup zot server local zot_root_dir=${BATS_FILE_TMPDIR}/zot local zot_config_file=${BATS_FILE_TMPDIR}/zot_config.json echo ${zot_root_dir} >&3 mkdir -p ${zot_root_dir} cat > ${zot_config_file}<&3 curl -L -f -s "http://127.0.0.1:5556/dex/auth/mock?client_id=zot-client&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fopenid%2Fauth%2Fcallback%2Fdex&response_type=code&scope=profile+email+groups+openid&state=$STATE" } @test "check dex is working" { run dex_session [ "$status" -eq 0 ] } @test "check for local disk writes" { run skopeo --insecure-policy copy --dest-tls-verify=false \ docker://centos:centos8 docker://localhost:8080/centos:8 [ "$status" -eq 0 ] cat strace.txt | grep openat | grep -v O_RDONLY | grep -Eo '\".*\"' | while read -r line ; do echo ${line} >&3 [[ "$line" =~ .*metadata.* || "$line" =~ .*trivy.* ]] done }