This commit is contained in:
Mateusz Gruszczyński
2026-09-03 11:49:10 +02:00
parent 4c9f8ff403
commit d7b6d0478f
9 changed files with 7057 additions and 7 deletions
+13
View File
@@ -33,6 +33,19 @@ for _ in $(seq 1 80); do
done
grep -q '"status":"ok"' "$TMP/health.json"
curl -fsS "http://127.0.0.1:$PORT/api-docs/openapi.json" >"$TMP/openapi.json"
python3 - "$TMP/openapi.json" <<'PYOPENAPI'
import json, sys
doc = json.load(open(sys.argv[1], encoding="utf-8"))
assert doc["openapi"] == "3.1.0"
assert "/api/zones/{id}/control" in doc["paths"]
assert "BearerToken" in doc["components"]["securitySchemes"]
assert doc["servers"][0]["url"] == "/"
PYOPENAPI
curl -fsSL "http://127.0.0.1:$PORT/api-docs" >"$TMP/swagger.html"
grep -qi 'swagger-ui' "$TMP/swagger.html"
curl -fsS "http://127.0.0.1:$PORT/api/bootstrap" >"$TMP/bootstrap.json"
grep -q 'sim-salon' "$TMP/bootstrap.json"