mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 06:00:33 +02:00
E2E: follow background jobs for Flatpak installs
The tabs UI (#4) runs Flatpak installs as server.start_job jobs, so a failed install answers 200 with a job id and reports the error on /api/job. The test now waits for the job instead of expecting an immediate 502. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b768162139
commit
19b9bc2dbe
2 files changed
+12
-5
No files matched your search
@@ -152,6 +152,12 @@ def ok(method, path, body=None, **kw):
|
||||
return out
|
||||
|
||||
|
||||
def finished(started, timeout=60):
|
||||
"""Wait for a background job (server.start_job's {"job": id}); returns its final state."""
|
||||
return wait_for(lambda: (lambda j: j['done'] and j)(ok('GET', f"/api/job?id={started['job']}")),
|
||||
timeout, f"job {started['job']}")
|
||||
|
||||
|
||||
def upload(path, mode, name=None):
|
||||
with open(path, 'rb') as f:
|
||||
data = f.read()
|
||||
|
||||
Reference in new issue
Block a user