mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-22 12:58:46 +00:00
fix(load-tests): accept any 2xx status as success (#10450)
Adjust status checks across various functions to accept any 2xx HTTP response instead of only 200, improving the robustness of the API response validation. fixes #10436
This commit is contained in:
@@ -22,7 +22,7 @@ export function createSession(org: Org, accessToken: string, checks?: any): Prom
|
||||
});
|
||||
response.then((res) => {
|
||||
check(res, {
|
||||
'add Session status ok': (r) => r.status === 201,
|
||||
'add Session status ok': (r) => r.status >= 200 && r.status < 300,
|
||||
}) || reject(`unable to add Session status: ${res.status} body: ${res.body}`);
|
||||
|
||||
addSessionTrend.add(res.timings.duration);
|
||||
@@ -48,7 +48,7 @@ export function setSession(id: string, session: any, accessToken: string, challe
|
||||
});
|
||||
response.then((res) => {
|
||||
check(res, {
|
||||
'set Session status ok': (r) => r.status === 200,
|
||||
'set Session status ok': (r) => r.status >= 200 && r.status < 300,
|
||||
}) || reject(`unable to set Session status: ${res.status} body: ${res.body}`);
|
||||
|
||||
setSessionTrend.add(res.timings.duration);
|
||||
|
||||
Reference in New Issue
Block a user