-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
Must
assertions support (#463)
* feat: add support for must assertions Signed-off-by: GitHub <[email protected]>
- Loading branch information
1 parent
effce0a
commit 5e90919
Showing
8 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
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
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,3 @@ | ||
testcases: | ||
- steps: | ||
- type: foobarcustommustassertion |
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,8 @@ | ||
executor: foobarcustommustassertion | ||
steps: | ||
- script: exit 1 | ||
assertions: | ||
- result.code MustEqual 0 | ||
- script: exit 0 | ||
assertions: | ||
- result.code MustEqual 0 |
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,13 @@ | ||
name: testsuite with a user executor in custom dir which has multiple steps and a must assertion | ||
testcases: | ||
- name: testfoobar multisteps custom with a must assertion | ||
steps: | ||
# spawn a venom sub-process and expect it to fail and make assertions on its error messages | ||
- type: exec | ||
script: '{{.venom.executable}} run failing/must_assertion.yml --lib-dir {{.venom.libdir}}' | ||
assertions: | ||
- result.code ShouldEqual 2 | ||
- result.systemout ShouldContainSubstring 'At least one required assertion failed, skipping remaining steps' | ||
- result.systemout ShouldContainSubstring '0:' # matches step #0: | ||
- result.systemout ShouldNotContainSubstring '1:' # matches step #1: | ||
- result.systemerr ShouldBeEmpty |
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