Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fail performance test if body contains error
Browse files Browse the repository at this point in the history
bprusinowski committed Feb 13, 2024

Verified

This commit was signed with the committer’s verified signature.
Nuclearistt Nuclearist
1 parent a1a33f8 commit 4025b7b
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions k6/performance-tests/graphql/DataCubeComponents.js
Original file line number Diff line number Diff line change
@@ -52,4 +52,8 @@ export default function Components() {
if (!check(res, { "Status code must be 200": (res) => res.status == 200 })) {
fail("Status code was *not* 200!");
}

if (res.error) {
fail("Error: " + res.error);
}
}
4 changes: 4 additions & 0 deletions k6/performance-tests/graphql/DataCubeMetadata.js
Original file line number Diff line number Diff line change
@@ -52,4 +52,8 @@ export default function Components() {
if (!check(res, { "Status code must be 200": (res) => res.status == 200 })) {
fail("Status code was *not* 200!");
}

if (res.error) {
fail("Error: " + res.error);
}
}
4 changes: 4 additions & 0 deletions k6/performance-tests/graphql/DataCubeObservations.js
Original file line number Diff line number Diff line change
@@ -113,4 +113,8 @@ export default function Observations() {
if (!check(res, { "Status code must be 200": (res) => res.status == 200 })) {
fail("Status code was *not* 200!");
}

if (res.error) {
fail("Error: " + res.error);
}
}
4 changes: 4 additions & 0 deletions k6/performance-tests/graphql/DataCubePreview.js
Original file line number Diff line number Diff line change
@@ -53,4 +53,8 @@ export default function Components() {
if (!check(res, { "Status code must be 200": (res) => res.status == 200 })) {
fail("Status code was *not* 200!");
}

if (res.error) {
fail("Error: " + res.error);
}
}

0 comments on commit 4025b7b

Please sign in to comment.