SPB Git

Repository Public

integration-test.sh 865 B 21 lines shellscript

1#!/bin/bash2# Runs the MCCCore test suite INCLUDING the integration tests against a real local control-api and a throwaway3# PostgreSQL database (created here, dropped at the end).  Usage: Scripts/integration-test.sh [swift test args]4set -euo pipefail5HERE="$(cd "$(dirname "$0")/.." && pwd)"6PSQL_BIN="$(command -v psql || echo /opt/homebrew/bin/psql)"7DB="mcc_swift_test_$(openssl rand -hex 4)"8"$HERE/Scripts/local-backend.sh" build9cleanup() {10  "$HERE/Scripts/local-backend.sh" stop || true11  "$PSQL_BIN" -X -q -d postgres -c "drop database if exists \"$DB\" with (force)" || true12}13trap cleanup EXIT14"$HERE/Scripts/local-backend.sh" start "$DB"15export MCC_IT_ORIGIN="http://localhost:${MCC_LOCAL_PORT:-8760}"16export MCC_IT_DATABASE="$DB"17export MCC_IT_PSQL="$PSQL_BIN"18export MCC_IT_BACKEND_SCRIPT="$HERE/Scripts/local-backend.sh"19cd "$HERE"20swift test "$@"21
Files main
Menu

Theme