venom
venom copied to clipboard
Passing semicolon through multiple variables fails test run
I noticed this during asserting for variable contents originating from the http executor for grafana metrics style data.
This is a service where data changes frequently, so instead of hitting it with the http executor all the time for fresh, I work with the initial data captured in a variable, and work my way off to assertions.
Simplified example YAML:
name: "Venom Variable Passing Fail Example"
testcases:
- name: Passing the Semicolon
steps:
- type: exec
script: echo '";"'
vars:
semicolon:
from: result.systemout
- type: exec
info: "semicolon: {{.semicolon}}"
script: echo "{{.semicolon}}" |wc -c
vars:
new_semicolon:
from: result.systemout
- type: exec
info: "new_semicolon: {{.new_semicolon}}"
script: echo
Note that new_semicolon will be 0:
• Passing-the-Semicolon
• exec PASS
• exec PASS
• exec PASS
[info] semicolon: ";"
[info] new_semicolon: 0
I'd expect 4:
> echo '";"' |wc -c
4
Looks like this is due to an error thrown in the background:
<system-err><![CDATA[
/var/folders/xk/nbn1dvld2z1dblaaaaaaahhhh0w0000gn/T/venom-346123047: line 1: : command not found
]]></system-err>
Further observations:
- Escaping as
"\";\""
doesn't seem to help. - Turning it around as
"';'"
seems to work fine.
Venom: venom@7f75ae868bc3f7464988c7218ad026331d2fcd6b MacOS