Files
2026-02-09 17:14:40 -03:00

41 lines
863 B
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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!"