Files
foxhunt/testing/integration/e2e_helpers/QUICK_START_INFRASTRUCTURE.md
jgrusewski 9c3d741a08 refactor: restructure repo — crates/, bin/, testing/ layout
Move 17 library crates into crates/, CLI binary into bin/fxt,
consolidate 10 test crates into testing/, split config crate
from deployment config files.

Root directory reduced from 38+ to ~17 directories.
All Cargo.toml paths and build.rs proto refs updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:56:00 +01:00

3.2 KiB

Quick Start: Infrastructure Validation

For Agents and Developers: Fast reference guide for infrastructure validation


TL;DR - One Command

# Validate all infrastructure (from project root)
./tests/e2e_helpers/infrastructure_health_check.sh

# Check exit code
echo $?
# 0 = All healthy, proceed
# 1 = Critical failure, DO NOT PROCEED
# 2 = Optional failure, can proceed with warnings

Service Status Quick Check

# All services at a glance
docker-compose ps

# Expected output: All services "Up (healthy)"

Critical Services (MUST BE HEALTHY)

PostgreSQL - Port 5432

# Quick test
psql postgresql://foxhunt:foxhunt_dev_password@localhost:5432/foxhunt -c 'SELECT 1'

# Should return: (1 row)

Redis - Port 6379

# Quick test
docker exec foxhunt-redis redis-cli ping

# Should return: PONG

Vault - Port 8200

# Quick test
curl -s http://localhost:8200/v1/sys/health | jq '.sealed'

# Should return: false

Application Services

All should be "Up (healthy)" in docker-compose ps:

  • API Gateway: Port 50051
  • Trading Service: Port 50052
  • Backtesting Service: Port 50053
  • ML Training Service: Port 50054

Common Issues

Service Not Healthy

# Restart single service
docker-compose restart <service_name>

# View logs
docker-compose logs -f <service_name>

All Services Down

# Restart all services
docker-compose down
docker-compose up -d

# Wait 30-60 seconds for health checks
docker-compose ps

PostgreSQL Connection Failed

# Check if running
docker-compose ps postgres

# Restart
docker-compose restart postgres

# Verify migrations
cd /home/jgrusewski/Work/foxhunt
cargo sqlx migrate run

Pre-Test Checklist

Before running any E2E tests:

  • Run ./tests/e2e_helpers/infrastructure_health_check.sh
  • Exit code = 0 (all healthy)
  • PostgreSQL responding to queries
  • Redis responding to PING
  • Vault unsealed

URLs Quick Reference

Service URL Credentials
PostgreSQL postgresql://localhost:5432/foxhunt foxhunt / foxhunt_dev_password
Redis redis://localhost:6379 (no auth)
Vault http://localhost:8200 Token: foxhunt-dev-root
Prometheus http://localhost:9090 (no auth)
Grafana http://localhost:3000 admin / foxhunt123
MinIO Console http://localhost:9001 foxhunt_test / foxhunt_test_password

Integration Example

#!/bin/bash
# Example E2E test runner

echo "Validating infrastructure..."
./tests/e2e_helpers/infrastructure_health_check.sh
EXIT_CODE=$?

if [ $EXIT_CODE -eq 1 ]; then
    echo "ERROR: Critical services down, cannot proceed"
    exit 1
elif [ $EXIT_CODE -eq 2 ]; then
    echo "WARNING: Optional services down, continuing..."
fi

echo "Running E2E tests..."
cargo test --test e2e_trading_integration

Full Documentation

For comprehensive details, see:

  • INFRASTRUCTURE_VALIDATION.md - Complete validation guide
  • AGENT_314_INFRASTRUCTURE_VALIDATION_REPORT.md - Validation results

Last Validated: 2025-10-12 (Agent 314, Wave 137) Status: 100% HEALTHY (17/17 checks passed)