bus: row 236 gap test takes any HTTP status in a grant.result (debug run 2, #1742)

This commit is contained in:
jason.woltje committed 2026-10-21 21:49:46 -05:00
1 parent d73ea24ead
commit 8bf442be90
1 file changed
+3 -2
+3 -2
View File
@@ -412,10 +412,11 @@ test('X-G6 and X-G8: the user and mint steps are written before their calls, and
'user-create': { step: true, call: true, result: false }, 'user-create': { step: true, call: true, result: false },
'token-create': { step: true, call: true, result: false }, 'token-create': { step: true, call: true, result: false },
}); });
// Every result carries the status Gitea gave. // Every result carries the HTTP status Gitea gave (user-get and fork-get answer 404 on a first grant).
const results = f.grantEvents().filter((e) => e.action === 'grant.result'); const results = f.grantEvents().filter((e) => e.action === 'grant.result');
assert.ok(results.length > 0); assert.ok(results.length > 0);
for (const e of results) assert.ok(Number.isInteger(e.status) && e.status >= 200 && e.status < 300, JSON.stringify(e)); for (const e of results) assert.ok(Number.isInteger(e.status) && e.status >= 100 && e.status < 600, JSON.stringify(e));
assert.ok(results.some((e) => e.status === 404));
}); });
test('X-G4: a fork by the seat user of another repository than the project refuses fork-foreign', async (t) => { test('X-G4: a fork by the seat user of another repository than the project refuses fork-foreign', async (t) => {