diff --git a/products/smoke-test.sh b/products/smoke-test.sh index 9e8f95d..0b9247a 100755 --- a/products/smoke-test.sh +++ b/products/smoke-test.sh @@ -148,17 +148,29 @@ echo -e "${YELLOW}--- Health Checks ---${NC}" check_health "PostgreSQL" "pg_isready -h ${BASE_URL} 2>/dev/null" check_health "Redis" "redis-cli -h ${BASE_URL} ping > /dev/null 2>&1" -for port in 3003 3004 3005 3006; do +for port in 3001 3002 3003 3004 3005 3006; do check_health "HTTP Service (port $port)" "curl -s -o /dev/null -w '%{http_code}' ${PROTOCOL}://${BASE_URL}:${port}/health 2>/dev/null | grep -q '200'" done +check_health "Route Proxy (port 8080)" "curl -s -o /dev/null -w '%{http_code}' ${PROTOCOL}://${BASE_URL}:8080/health 2>/dev/null | grep -q '200'" + echo "" # 2. Tenant Creation & API Tests echo -e "${YELLOW}--- Tenant Creation & API Tests ---${NC}" +# P1 (port 3001) +echo -e "\n${YELLOW}P1 - route (port 3001):${NC}" +P1_TOKEN=$(create_tenant 3001 "P1") +test_endpoint 3001 "P1" "/api/v1/usage" "$P1_TOKEN" + +# P2 (port 3002) +echo -e "\n${YELLOW}P2 - drift (port 3002):${NC}" +P2_TOKEN=$(create_tenant 3002 "P2") +test_endpoint 3002 "P2" "/api/v1/reports" "$P2_TOKEN" + # P3 (port 3003) -echo -e "\n${YELLOW}P3 (port 3003):${NC}" +echo -e "\n${YELLOW}P3 - alert (port 3003):${NC}" P3_TOKEN=$(create_tenant 3003 "P3") test_endpoint 3003 "P3" "/api/v1/incidents" "$P3_TOKEN" test_endpoint 3003 "P3" "/api/v1/summary" "$P3_TOKEN"