scalar-meta-hackathon / scripts /smoke_test.sh
RealBhupesh
Tighten root submission packaging
f9dd82f
Raw
History Blame Contribute Delete
968 Bytes
#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")/.."
python app.py >/tmp/email_triage_app.log 2>&1 &
APP_PID=$!
cleanup() {
kill "$APP_PID" >/dev/null 2>&1 || true
}
trap cleanup EXIT INT TERM
sleep 3
curl -fsS http://127.0.0.1:7860/health >/tmp/email_triage_health.json
curl -fsS http://127.0.0.1:7860/tasks >/tmp/email_triage_tasks.json
curl -fsS http://127.0.0.1:7860/openenv.yaml >/tmp/email_triage_openenv.yaml
curl -fsS -X POST http://127.0.0.1:7860/reset \
-H "Content-Type: application/json" \
-d '{"task_id":"email_classification","seed":42,"session_id":"smoke","scenario_id":"easy_invoice_copy"}' \
>/tmp/email_triage_reset.json
curl -fsS -X POST http://127.0.0.1:7860/step \
-H "Content-Type: application/json" \
-d '{"session_id":"smoke","action":{"action_type":"classify","category":"billing","sentiment":"neutral"}}' \
>/tmp/email_triage_step.json
curl -fsS "http://127.0.0.1:7860/state?session_id=smoke" >/tmp/email_triage_state.json