Remove live-device UI labels and clean persistence acceptance jobs
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user