#!/bin/bash # Quick test for mock SCADA and optimizer services set -e echo "๐Ÿงช Testing Mock Services..." echo "" # Test Mock SCADA echo "๐Ÿ“Š Testing Mock SCADA..." if curl -s http://localhost:8081/health | grep -q "healthy"; then echo "โœ… Mock SCADA is healthy" # Get SCADA data echo " Fetching SCADA data..." curl -s http://localhost:8081/api/v1/data | jq '.data | keys' 2>/dev/null || echo " SCADA data available" else echo "โŒ Mock SCADA is not responding" fi echo "" # Test Mock Optimizer echo "๐Ÿง  Testing Mock Optimizer..." if curl -s http://localhost:8082/health | grep -q "healthy"; then echo "โœ… Mock Optimizer is healthy" # Get available models echo " Fetching optimization models..." curl -s http://localhost:8082/api/v1/models | jq '.models | keys' 2>/dev/null || echo " Optimization models available" else echo "โŒ Mock Optimizer is not responding" fi echo "" # Test Calejo Control Adapter echo "๐ŸŒ Testing Calejo Control Adapter..." if curl -s http://localhost:8080/health | grep -q "healthy"; then echo "โœ… Calejo Control Adapter is healthy" # Test dashboard echo " Testing dashboard access..." curl -s -I http://localhost:8080/dashboard | head -1 | grep -q "200" && echo " Dashboard accessible" || echo " Dashboard status check" else echo "โŒ Calejo Control Adapter is not responding" fi echo "" echo "โœ… Mock services test completed!"