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:
Silvan
2025-08-11 11:36:40 +03:00
committed by GitHub
parent 9ed0daaf8c
commit f13529b31f
8 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -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);