17 lines
626 B
Bash
Executable File
17 lines
626 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
RUNTIME_ROOT="${1:-${AIOS_RUNTIME_ROOT:-$(pwd)}}"
|
|
python3 -m py_compile "$RUNTIME_ROOT/webops/app/aios_webops_app.py"
|
|
python3 "$RUNTIME_ROOT/webops/app/aios_webops_app.py" >/tmp/aios-webops-smoke.log 2>&1 &
|
|
PID=$!
|
|
trap 'kill $PID >/dev/null 2>&1 || true' EXIT
|
|
sleep 1
|
|
PORT="${AIOS_WEBOPS_PORT:-18081}"
|
|
python3 - <<PY
|
|
import urllib.request, os
|
|
port=os.environ.get('AIOS_WEBOPS_PORT','18081')
|
|
resp=urllib.request.urlopen(f'http://127.0.0.1:{port}/health/ready',timeout=5).read().decode()
|
|
assert 'owner' in resp and 'server-hw' in resp and 'cnnetmkt.top' in resp
|
|
print('WEBOPS_SMOKE_OK')
|
|
PY
|