mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-29 08:07:37 +09:00
One-click PowerShell entry point that spins up Ubuntu/Debian VMs in parallel, installs ServerKit from the local working tree (not origin/main), runs a pytest API harness against the live panel, and aggregates results into a self-contained HTML report. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16 lines
550 B
Python
16 lines
550 B
Python
import requests
|
|
|
|
|
|
def test_backend_health(http, base_url):
|
|
r = http.get(f"{base_url}/api/v1/system/health", timeout=10)
|
|
assert r.status_code == 200, r.text
|
|
body = r.json()
|
|
assert body.get("status") == "healthy", body
|
|
|
|
|
|
def test_frontend_reachable(base_url):
|
|
# Frontend served by nginx on :80 (not the same as backend BASE_URL)
|
|
url = base_url.replace(":5000", "").rstrip("/") or "http://127.0.0.1"
|
|
r = requests.get(url, timeout=10, allow_redirects=True)
|
|
assert r.status_code < 500, f"frontend returned {r.status_code}"
|