Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

24 строки
675B

  1. #!/usr/bin/env bash
  2. # Frontend-agnostic test runner: plain curl + a JSON parser, no PowerShell,
  3. # no cscript, no SSH access to the VM required. Runnable from any CLI that
  4. # can reach the site over HTTP.
  5. #
  6. # Usage: ./run-self-test.sh http://100.127.62.31:8090
  7. set -euo pipefail
  8. BASE_URL="${1:?Usage: run-self-test.sh <base-url>, e.g. http://100.127.62.31:8090}"
  9. response=$(curl -sf "$BASE_URL/self-test")
  10. echo "$response" | python3 -m json.tool
  11. ok=$(echo "$response" | python3 -c 'import json, sys; print("true" if json.load(sys.stdin)["ok"] else "false")')
  12. if [ "$ok" = "true" ]; then
  13. echo "RESULT: ALL PASS"
  14. exit 0
  15. else
  16. echo "RESULT: FAILURE"
  17. exit 1
  18. fi

Powered by TurnKey Linux.