veza/tmt/tests/backend/integration.sh

28 lines
784 B
Bash
Raw Normal View History

#!/bin/bash
set -e
REPO_ROOT=$(git rev-parse --show-toplevel)
BACKEND_DIR="$REPO_ROOT/veza-backend-api"
echo "📍 Backend Integration Tests"
echo "📂 Backend Directory: $BACKEND_DIR"
cd "$BACKEND_DIR"
# Check if DB is reachable (optional, or rely on test failure)
# We assume existing environment setup (docker-compose up) or we skip
# For now, we run the tests in the 'tests' directory if they exist
# Or standard go test ./... with tags
echo "🧪 Running Integration Tests..."
# Assuming integration tests are marked or in specific folders
# If 'tests/' folder exists and has go files:
if [ -d "tests" ]; then
go test ./tests/... -v
else
echo "⚠️ No 'tests' directory found. Running all tests."
go test ./... -v
fi
echo "✅ Integration tests completed."