#!/usr/bin/env bash # Integration test suite for PR validation on staging VM # # This script runs inside the staging VM after the PR's NixOS config # has been deployed. It tests that all services come up correctly. # # Usage: pr-test-vm ssh < tests/run-integration.sh set -euo pipefail echo "==> Integration tests starting..." # Test Docker is running echo " [1/3] Docker daemon..." docker info > /dev/null 2>&1 || { echo "FAIL: Docker not running"; exit 1; } echo " OK" # Test compose stack can start echo " [2/3] Docker Compose stack..." docker compose -f /opt/data/compose.yml ps > /dev/null 2>&1 || { echo "FAIL: Compose stack not running"; exit 1; } echo " OK" # Test services are healthy echo " [3/3] Service health checks..." # TODO: add per-service health checks echo " OK (placeholder)" echo "==> All integration tests passed."