Remove live-device UI labels and clean persistence acceptance jobs

This commit is contained in:
Pigway
2026-10-05 00:37:07 +08:00
parent 5dc10a10e9
commit 124530c336
5 changed files with 12 additions and 7 deletions
+7 -2
View File
@@ -29,12 +29,15 @@ def api(path, method="GET", payload=None):
},
)
with urlopen(request, timeout=10) as response:
return json.loads(response.read())
body = response.read()
return json.loads(body) if body else None
assert api("/api/v1/settings")["mock"] is True, "Persistence test requires Mock mode"
record = Path("data/persistence-acceptance.json")
if args.mode == "record":
if record.exists():
raise SystemExit("An acceptance record already exists; run check first")
job = api(
"/api/v1/jobs",
"POST",
@@ -76,4 +79,6 @@ else:
assert api("/api/v1/operations/" + saved["operation_id"])["status"] == "COMPLETED"
assert any(a["asset_id"] == saved["asset_id"] for a in api("/api/v1/assets"))
assert api("/ready")["status"] == "ready"
print("Restart persistence: 4 checks passed (job/operation/asset/readiness)")
api("/api/v1/jobs/" + saved["job_id"], "DELETE")
record.unlink()
print("Restart persistence: 4 checks passed; acceptance job removed")