22 lines
608 B
Bash
22 lines
608 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# DEVOPS-GRAPH-24-003: simulation endpoint smoke
|
|
|
|
TARGET=${TARGET:-"http://localhost:5000"}
|
|
OUT="out/graph-sim"
|
|
mkdir -p "$OUT"
|
|
|
|
echo "[graph-sim] hitting simulation endpoints"
|
|
|
|
curl -sSf "${TARGET}/graph/api/simulation/ping" > "${OUT}/ping.json"
|
|
curl -sSf "${TARGET}/graph/api/simulation/run?limit=5" > "${OUT}/run.json"
|
|
|
|
cat > "${OUT}/summary.txt" <<EOF
|
|
ping: $(jq -r '.status' "${OUT}/ping.json" 2>/dev/null || echo "unknown")
|
|
run_len: $(jq '. | length' "${OUT}/run.json" 2>/dev/null || echo "0")
|
|
EOF
|
|
|
|
echo "[graph-sim] completed; summary:"
|
|
cat "${OUT}/summary.txt"
|