Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing semicolon through multiple variables fails test run #680

Open
miklosbagi opened this issue Jun 7, 2023 · 0 comments
Open

Passing semicolon through multiple variables fails test run #680

miklosbagi opened this issue Jun 7, 2023 · 0 comments

Comments

@miklosbagi
Copy link
Contributor

miklosbagi commented Jun 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant