mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 21:11:13 +00:00
b0fffa6d42
Phase A baseline outputs from /autodev (Steps 1-5): - Problem & solution docs (_docs/00_problem, _docs/01_solution) - Codebase documentation (_docs/02_document) incl. architecture, module-layout, glossary, system-flows, baseline compliance scan - Test specs (blackbox, performance, resilience, security, resource, traceability matrix) - Test task decomposition (_docs/02_tasks/todo): AZ-285..AZ-290 - Testability refactor (_docs/04_refactoring/01-testability-refactoring): - TC-01 Move DownloadedTileInfoV2 + new ExistingTileInfo to Common.DTO - TC-02 Replace dead ISatelliteDownloader API with real signatures - TC-03 GoogleMapsDownloaderV2 implements ISatelliteDownloader - TC-04 TileService depends on ISatelliteDownloader (mockable) - TC-05 DI + endpoints use ISatelliteDownloader - Test runner scripts (scripts/run-tests.sh, run-performance-tests.sh) - Autodev state pointer (_docs/_autodev_state.md) Prepares the codebase for AZ-285..AZ-290 unit/integration test work. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.4 KiB
Bash
Executable File
40 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
|
|
cleanup() {
|
|
docker compose -f "$PROJECT_ROOT/docker-compose.yml" -f "$PROJECT_ROOT/docker-compose.tests.yml" down --remove-orphans 2>/dev/null || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
echo "=== Satellite Provider Test Suite ==="
|
|
echo ""
|
|
|
|
if [[ "${1:-}" == "--unit-only" ]]; then
|
|
echo "Running unit tests only..."
|
|
docker run --rm -v "$PROJECT_ROOT:/src" -w /src mcr.microsoft.com/dotnet/sdk:8.0 \
|
|
dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj \
|
|
--no-restore --configuration Release \
|
|
--logger "console;verbosity=normal"
|
|
echo ""
|
|
echo "=== Unit tests complete ==="
|
|
exit 0
|
|
fi
|
|
|
|
echo "Running full test suite (unit + integration)..."
|
|
echo ""
|
|
|
|
echo "Step 1: Unit tests"
|
|
docker run --rm -v "$PROJECT_ROOT:/src" -w /src mcr.microsoft.com/dotnet/sdk:8.0 \
|
|
sh -c "dotnet restore SatelliteProvider.sln && dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj --no-restore --configuration Release --logger 'console;verbosity=normal'"
|
|
|
|
echo ""
|
|
echo "Step 2: Integration tests (Docker Compose)"
|
|
docker compose -f "$PROJECT_ROOT/docker-compose.yml" -f "$PROJECT_ROOT/docker-compose.tests.yml" \
|
|
up --build --abort-on-container-exit --exit-code-from integration-tests
|
|
|
|
echo ""
|
|
echo "=== All tests passed ==="
|