feat: add integration test runner script
- 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
This commit is contained in:
24
tests/integration/run-integration.sh
Executable file
24
tests/integration/run-integration.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/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
|
||||||
Reference in New Issue
Block a user