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