-
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.
fix(venom): use vars as string or struct (#361)
* fix(venom): use vars as string or struct * fix(venom): display line number for info * add assertion example Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
- Loading branch information
Showing
12 changed files
with
126 additions
and
19 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
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,37 @@ | ||
name: play-with-vars | ||
vars: | ||
aString: '{"foo": "bar"}' | ||
multipleVars: {"coo": "car"} | ||
multipleVarsSecondSyntax: | ||
goo: gar | ||
aQuote: 'foo"bar' | ||
|
||
testcases: | ||
- name: foobar | ||
steps: | ||
- script: echo '{{.aString}}' | ||
info: value of aString is {{.aString}} | ||
assertions: | ||
- result.systemoutjson.foo ShouldEqual bar | ||
- 'result.systemout ShouldEqual {"foo": "bar"}' | ||
|
||
- name: coocar | ||
steps: | ||
- script: echo '{{.multipleVars.coo}}' | ||
info: value of multipleVars.coo is {{.multipleVars.coo}} | ||
assertions: | ||
- result.systemout ShouldEqual car | ||
|
||
- name: goocar | ||
steps: | ||
- script: echo '{{.multipleVarsSecondSyntax.goo}}' | ||
info: value of multipleVarsSecondSyntax.goo is {{.multipleVarsSecondSyntax.goo}} | ||
assertions: | ||
- result.systemout ShouldEqual gar | ||
|
||
- name: aQuote | ||
steps: | ||
- script: echo '{{.aQuote}}' | ||
info: value of aQuote is {{.aQuote}} | ||
assertions: | ||
- result.systemout ShouldEqual foo"bar |
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