bus: decisions read follow-up tests, seen-then-resolve, list-before-503 and full rows (#1560)
Row 67 round 2 (rebase only), owner Filbert, candidate manifest 4387c8d5 on f38b7f46.
Approved by Dewey (27648) and Darkwing (27649); round 1 by Dewey (27452) and
Darkwing (27627). Sage's gate green 01:58-02:03Z.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -191,6 +191,11 @@ test('bus refusals map to statuses and never carry a path or a stack', async t =
|
||||
assert.deepEqual([shape.status, (await shape.json()).error], [502, 'invalid-response']);
|
||||
const unset = await fetch(`http://127.0.0.1:${none.address().port}/api/bus/agents`);
|
||||
assert.deepEqual([unset.status, (await unset.json()).error], [503, 'not-configured']);
|
||||
// Row 67 (#1560): with no bus, a bad argument is still a 400; the request is checked first.
|
||||
for (const [query, status, error] of [['decisions?list=bad', 400, 'invalid-request'], ['decisions?list=roles', 503, 'not-configured'], ['trail?subject=%3C', 400, 'invalid-request']]) {
|
||||
const r = await fetch(`http://127.0.0.1:${none.address().port}/api/bus/${query}`);
|
||||
assert.deepEqual([query, r.status, (await r.json()).error], [query, status, error]);
|
||||
}
|
||||
});
|
||||
|
||||
// A fake human CLI: it reads the request, then acts on args.mode.
|
||||
|
||||
Reference in New Issue
Block a user