# Example Test Environment Configuration
# Copy this file to .env.test and adjust values as needed
# For sensitive values, create .env.test.local (not committed to git)

# === Test Mode Configuration ===
NODE_ENV=test
MCP_MODE=test
TEST_ENVIRONMENT=true

# === Database Configuration ===
# Use :memory: for in-memory SQLite or provide a file path
NODE_DB_PATH=:memory:
REBUILD_ON_START=false
TEST_SEED_DATABASE=true
TEST_SEED_TEMPLATES=true

# === API Configuration ===
# Mock API endpoints for testing
N8N_API_URL=http://localhost:3001/mock-api
N8N_API_KEY=your-test-api-key
N8N_WEBHOOK_BASE_URL=http://localhost:3001/webhook
N8N_WEBHOOK_TEST_URL=http://localhost:3001/webhook-test

# === Test Server Configuration ===
PORT=3001
HOST=127.0.0.1
CORS_ORIGIN=http://localhost:3000,http://localhost:5678

# === Authentication ===
AUTH_TOKEN=test-auth-token
MCP_AUTH_TOKEN=test-mcp-auth-token

# === Logging Configuration ===
LOG_LEVEL=error
DEBUG=false
TEST_LOG_VERBOSE=false
ERROR_SHOW_STACK=true
ERROR_SHOW_DETAILS=true

# === Test Execution Configuration ===
TEST_TIMEOUT_UNIT=5000
TEST_TIMEOUT_INTEGRATION=15000
TEST_TIMEOUT_E2E=30000
TEST_TIMEOUT_GLOBAL=60000
TEST_RETRY_ATTEMPTS=2
TEST_RETRY_DELAY=1000
TEST_PARALLEL=true
TEST_MAX_WORKERS=4

# === Feature Flags ===
FEATURE_TEST_COVERAGE=true
FEATURE_TEST_SCREENSHOTS=false
FEATURE_TEST_VIDEOS=false
FEATURE_TEST_TRACE=false
FEATURE_MOCK_EXTERNAL_APIS=true
FEATURE_USE_TEST_CONTAINERS=false

# === Mock Service Configuration ===
MSW_ENABLED=true
MSW_API_DELAY=0
REDIS_MOCK_ENABLED=true
REDIS_MOCK_PORT=6380
ELASTICSEARCH_MOCK_ENABLED=false
ELASTICSEARCH_MOCK_PORT=9201

# === Test Data Paths ===
TEST_FIXTURES_PATH=./tests/fixtures
TEST_DATA_PATH=./tests/data
TEST_SNAPSHOTS_PATH=./tests/__snapshots__

# === Performance Testing ===
PERF_THRESHOLD_API_RESPONSE=100
PERF_THRESHOLD_DB_QUERY=50
PERF_THRESHOLD_NODE_PARSE=200

# === Rate Limiting ===
RATE_LIMIT_MAX=0
RATE_LIMIT_WINDOW=0

# === Cache Configuration ===
CACHE_TTL=0
CACHE_ENABLED=false

# === Cleanup Configuration ===
TEST_CLEANUP_ENABLED=true
TEST_CLEANUP_ON_FAILURE=false

# === Network Configuration ===
NETWORK_TIMEOUT=5000
NETWORK_RETRY_COUNT=0

# === Memory Limits ===
TEST_MEMORY_LIMIT=512

# === Code Coverage ===
COVERAGE_DIR=./coverage
COVERAGE_REPORTER=lcov,html,text-summary