Skip to content

Commit

Permalink
Test: log request url on request failure in performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivard committed Oct 25, 2023
1 parent 5484d91 commit 09c4d8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion testdata/performance/irma-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function checkResponse(response, expectedOutput = '') {
'verify status code': (r) => r.status === 200,
'verify body': (r) => r.body != null && r.body.includes(expectedOutput),
});
if (!checkOutput) fail(`unexpected response: status ${response.status}, error "${response.error}", body "${response.body}"`);
if (!checkOutput) fail(`unexpected response: url ${response.request.url}, status ${response.status}, error "${response.error}", body "${response.body}"`);
}

export default function () {
Expand Down
3 changes: 2 additions & 1 deletion testdata/performance/keyshare-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function checkResponse(response, expectedOutput = '') {
'verify status code': (r) => r.status === 200,
'verify body': (r) => r.body != null && r.body.includes(expectedOutput),
});
if (!checkOutput) fail(`unexpected response: status ${response.status}, error "${response.error}", body "${response.body}"`);
if (!checkOutput) fail(`unexpected response: url ${response.request.url}, status ${response.status}, error "${response.error}", body "${response.body}"`);
}

export function setup() {
Expand Down Expand Up @@ -70,6 +70,7 @@ export default function ({ testAccounts }) {
const testAccount = testAccounts[vu.idInTest - 1];

const pinResp = http.post(`${url}/users/verify/pin`, JSON.stringify(testAccount));
checkResponse(pinResp);

const proveParams = {
headers: {
Expand Down

0 comments on commit 09c4d8a

Please sign in to comment.