load helpers_zot function verify_prerequisites { if [ ! command -v curl ] &>/dev/null; then echo "you need to install curl as a prerequisite to running the tests" >&3 return 1 fi if [ ! command -v jq ] &>/dev/null; then echo "you need to install jq as a prerequisite to running the tests" >&3 return 1 fi } function setup_file() { # Verify prerequisites are available if ! (verify_prerequisites); then exit 1 fi # Download test data to folder common for the entire suite, not just this file skopeo --insecure-policy copy --format=oci docker://ghcr.io/project-zot/test-images/alpine:3.17.3 oci:${TEST_DATA_DIR}/alpine:3.17.3 # Setup zot server ZOT_ROOT_DIR=${BATS_RUN_TMPDIR}/zot echo ${ZOT_ROOT_DIR} local zot_log_file=${BATS_RUN_TMPDIR}/zot-log.json local zot_config_file=${BATS_RUN_TMPDIR}/zot_config.json mkdir -p ${ZOT_ROOT_DIR} touch ${zot_log_file} cat >${zot_config_file} <