- Create automated service availability checker - Verify CouchDB and frontend services before tests - Add graceful error handling for missing services - Enable consistent integration test execution - Support both CI/CD and local development workflows
25 lines
609 B
Bash
Executable File
25 lines
609 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Integration Test Runner
|
|
# Ensures services are running before running integration tests
|
|
|
|
echo "🔍 Checking service availability..."
|
|
|
|
# Check CouchDB
|
|
if ! curl -s http://localhost:5984/ > /dev/null 2>&1; then
|
|
echo "❌ CouchDB not available at localhost:5984"
|
|
exit 1
|
|
fi
|
|
|
|
# Check Frontend
|
|
if ! curl -s http://localhost:8080/ > /dev/null 2>&1; then
|
|
echo "⚠️ Frontend not available at localhost:8080"
|
|
echo " Starting services..."
|
|
# Could add auto-start logic here
|
|
fi
|
|
|
|
echo "✅ Services are available"
|
|
echo "🧪 Running integration tests..."
|
|
|
|
bun run test:integration
|