generated from grafana/k6-template-es6
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from grafana/add-exit-on-error
Implement exitOnError config option
- Loading branch information
Showing
6 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const AGGREGATE_CHECKS = true; | ||
export const EXIT_ON_ERROR = false; | ||
export const LOG_FAILURES = false; | ||
export const TRUNCATE_VARIABLE_THRESHOLD = 100; | ||
export const TRUNCATE_MSG_THRESHOLD = 300; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import chai, { describe, expect } from '../build/k6chaijs.min.js'; | ||
import { sleep } from 'k6'; | ||
|
||
// Set exitOnError=true to exit k6 on the first failed check. | ||
chai.config.exitOnError = true; | ||
|
||
export let options = { | ||
iterations: 3 | ||
}; | ||
|
||
export default function testSuite() { | ||
let fakeResponse = { | ||
status: 401 | ||
}; | ||
|
||
describe('Testing check aggregation', () => { | ||
expect(fakeResponse.status, 'response status').to.equal(200); | ||
}); | ||
|
||
sleep(1); | ||
} |