Skip to content

Using replace helper with the variables from previous step #890

@asm76

Description

@asm76
$ venom version
Version venom: v1.2.0

Using the replace helper with this testsuite,

name: test
testcases:
  - name: test
    steps:
      - name: get
        command: [echo, "https://tututu/lalala?pumpumpum=0&blablabla=1"]
        vars:
          myurl:
            from: result.systemout
      - name: upper
        command:
          - echo
          - "{{.myurl | upper}}"
      - name: replace
        command:
          - echo
          - "{{.myurl | replace `amp;` ``}}"

I get an error message: failed to execute template: template: input:17:24: executing "input" at <replace amp; ``>: error calling replace: reflect: Call using *interpolate.void as type string. Meanwhile, the upper helper is working. How can I strip amp; from the url?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions