- Introduced a new `.env.test.example` file for integration test configuration. - Added a `Makefile` to streamline test commands for unit and integration tests. - Implemented an integration testing harness with support for PostgreSQL, MinIO, and Redis using testcontainers. - Created a suite of integration tests covering health checks and user management functionalities. - Enhanced CI workflow to include integration tests with necessary environment variables.
21 lines
410 B
Bash
Executable File
21 lines
410 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
export ULTI_TEST_INTEGRATION=1
|
|
|
|
if [[ -f .env.test ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
source .env.test
|
|
set +a
|
|
fi
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
exec go test -tags=integration ./internal/integrationtest/... -count=1 -timeout=10m
|
|
fi
|
|
|
|
exec go test -tags=integration -count=1 -timeout=10m "$@"
|