# Note: Intended to be run as "make run-blackbox-tests" or "make run-blackbox-ci" # Makefile target installs & checks all necessary tooling # Extra tools that are not covered in Makefile target needs to be added in verify_prerequisites() load helpers_zot load helpers_scrub function verify_prerequisites() { return 0 } function setup_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 } function setup() { # verify prerequisites are available if ! $(verify_prerequisites); then exit 1 fi # Setup zot server ZOT_ROOT_DIR=${BATS_FILE_TMPDIR}/zot echo ${ZOT_ROOT_DIR} ZOT_LOG_FILE=${ZOT_ROOT_DIR}/zot-log.json ZOT_CONFIG_FILE=${BATS_FILE_TMPDIR}/zot_config.json zot_port=$(get_free_port) echo ${zot_port} > ${BATS_FILE_TMPDIR}/zot.port mkdir -p ${ZOT_ROOT_DIR} touch ${ZOT_LOG_FILE} cat >${ZOT_CONFIG_FILE} <