mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
- Move integration tests and mock upstream resources from `integration/` to `test/` directory. - Add `test/integration.sh` script to orchestrate environment setup and test execution. - Update build context in `docker-compose.integration.yml` to match new structure. - Add documentation for local development and integration testing workflows in README.
21 lines
571 B
Bash
Executable File
21 lines
571 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Runs integration tests inside the ez-api repo (builds docker-compose + go test).
|
|
|
|
REPO_ROOT=$(cd -- "$(dirname -- "$0")"/.. && pwd)
|
|
compose_file="$REPO_ROOT/docker-compose.integration.yml"
|
|
|
|
echo "[integration] bringing up services..."
|
|
docker compose -f "$compose_file" up --build -d --wait
|
|
|
|
cleanup() {
|
|
echo "[integration] tearing down services..."
|
|
docker compose -f "$compose_file" down -v
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
echo "[integration] running go test with integration tag..."
|
|
cd "$REPO_ROOT/test"
|
|
go test -tags=integration ./...
|