-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub <noreply@github.com>
- Loading branch information
1 parent
28ff369
commit ec5daf8
Showing
2 changed files
with
52 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: testsuite run in verbose mode | ||
testcases: | ||
- name: testsuite run in verbose mode | ||
steps: | ||
# spawn a venom sub-process and expect it to fail and make assertions on its error messages | ||
# ensure no color to avoid annoying checks | ||
- type: exec | ||
script: NO_COLOR=1 {{.venom.executable}} run failing/verbose_output.yml {{.value.opt}} | ||
range: | ||
verbose: | ||
opt: "-v" | ||
op: Should | ||
default: | ||
opt: "" | ||
op: ShouldNot | ||
assertions: | ||
- result.code ShouldEqual 2 | ||
- result.systemerr ShouldBeEmpty | ||
# single step | ||
- result.systemout {{.value.op}}ContainSubstring 'exec SUCCESS' | ||
# named step | ||
- result.systemout {{.value.op}}ContainSubstring 'hello-world SUCCESS' | ||
# multi steps | ||
- result.systemout {{.value.op}}ContainSubstring 'step1 SUCCESS' | ||
- result.systemout {{.value.op}}ContainSubstring 'step2 FAILURE' | ||
# ranged steps | ||
- result.systemout {{.value.op}}ContainSubstring 'exec (range=0) SUCCESS' | ||
- result.systemout {{.value.op}}ContainSubstring 'exec (range=1) FAILURE' | ||
- result.systemout {{.value.op}}ContainSubstring 'exec (range=2) SUCCESS' | ||
# must assertions | ||
- result.systemout {{.value.op}}ContainSubstring 'must1 FAILURE' | ||
- result.systemout ShouldContainSubstring 'At least one required assertion failed, skipping remaining steps' | ||
- result.systemout {{.value.op}}ContainSubstring '2 other steps were skipped' | ||
- result.systemout ShouldNotContainSubstring 'must2' | ||
- result.systemout ShouldNotContainSubstring 'must3' |