#!/bin/bash # Script para testar os endpoints da API API_URL="${1:-http://localhost:5000}" echo "🧪 Testando API em $API_URL" echo "" # Teste 1: Status echo "1️⃣ Testando status da aplicação..." curl -s "$API_URL/" | python3 -m json.tool echo "" echo "" # Teste 2: Health check echo "2️⃣ Testando health check..." curl -s "$API_URL/health" | python3 -m json.tool echo "" echo "" # Teste 3: Summary echo "3️⃣ Testando resumo estatístico..." curl -s "$API_URL/api/summary" | python3 -m json.tool echo "" echo "" # Teste 4: Tickets (apenas primeiras linhas) echo "4️⃣ Testando tickets (JSON)..." curl -s "$API_URL/api/tickets" | python3 -m json.tool | head -50 echo "" echo "" # Teste 5: Metrics echo "5️⃣ Testando métricas (Prometheus)..." curl -s "$API_URL/metrics" | head -20 echo "" echo "" echo "✅ Testes concluídos!"