dev_test.sh 486 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. BASE_URL=${BASE_URL:-"http://127.0.0.1:8787"}
  4. GRAPH_ID=${GRAPH_ID:-"dev-graph"}
  5. SYNC_BASE="${BASE_URL}/sync/${GRAPH_ID}"
  6. curl -sS "${BASE_URL}/health"
  7. echo
  8. curl -sS "${SYNC_BASE}/health"
  9. echo
  10. curl -sS "${SYNC_BASE}/pull?since=0"
  11. echo
  12. curl -sS "${SYNC_BASE}/snapshot"
  13. echo
  14. curl -sS -X POST "${SYNC_BASE}/tx" \
  15. -H "content-type: application/json" \
  16. --data-binary '{"t-before":0,"tx":"[]"}'
  17. echo
  18. curl -sS "${SYNC_BASE}/pull?since=0"
  19. echo