45 lines
1000 B
Bash
Executable File
45 lines
1000 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Calejo Control Adapter - Deployment Validation Script
|
|
# Validates that the deployment was successful
|
|
|
|
set -e
|
|
|
|
echo "🔍 Validating deployment..."
|
|
|
|
# Check if services are running
|
|
if ! docker-compose ps | grep -q "Up"; then
|
|
echo "❌ Some services are not running"
|
|
docker-compose ps
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ All services are running"
|
|
|
|
# Test health endpoint
|
|
if ! curl -s -f http://localhost:8080/health > /dev/null; then
|
|
echo "❌ Health endpoint is not accessible"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Health endpoint is accessible"
|
|
|
|
# Test dashboard endpoint
|
|
if ! curl -s -f http://localhost:8080/dashboard > /dev/null; then
|
|
echo "❌ Dashboard endpoint is not accessible"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Dashboard endpoint is accessible"
|
|
|
|
# Test API endpoint
|
|
if ! curl -s -f http://localhost:8080/api/v1/status > /dev/null; then
|
|
echo "❌ API endpoint is not accessible"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ API endpoint is accessible"
|
|
|
|
echo ""
|
|
echo "🎉 Deployment validation passed!"
|
|
exit 0 |