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

[bug] skip doesn't work with variables from previous steps #777

Open
berlic opened this issue Mar 14, 2024 · 1 comment
Open

[bug] skip doesn't work with variables from previous steps #777

berlic opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@berlic
Copy link

berlic commented Mar 14, 2024

Hey. Thanks for the useful testing tool.

There is and issue that only global variables or variables from other test cases work with 'skip', but not from previous steps within a test case.

Reproducible with this example:

vars:
  static_var: 1
testcases:
- name: skip-works1
  steps:
  - name: do-step
    type: exec
    script: echo .
    vars:
      dynamic_var:
        from: result.code
        default: ""
  - name: dont-skip-step
    type: exec
    script: echo .
    skip:
      - static_var ShouldEqual 1
  - name: skip-step
    type: exec
    script: echo .
    skip:
      - static_var ShouldEqual 0
- name: skip-works2
  steps:
  - name: do-step
    type: exec
    script: echo .
  - name: dont-skip-step
    type: exec
    script: echo .
    skip:
      - skip-works1.dynamic_var ShouldEqual 0
  - name: skip-step
    type: exec
    script: echo .
    skip:
      - skip-works1.dynamic_var ShouldEqual 1
- name: skip-doesnt-work
  steps:
  - name: do-step
    type: exec
    script: echo .
    vars:
      another_dynamic_var:
        from: result.code
        default: ""
  - name: dont-skip-step
    type: exec
    script: echo another_dynamic_var={{.skip-doesnt-work.another_dynamic_var}}
    skip:
      - skip-doesnt-work.another_dynamic_var ShouldEqual 0
  - name: skip-step
    type: exec
    script: echo another_dynamic_var={{.skip-doesnt-work.another_dynamic_var}}
    skip:
      - skip-doesnt-work.another_dynamic_var ShouldEqual 1

I found some abandoned PRs on this matter: #685, but the latest release is sill plagued with this issue.

@berlic
Copy link
Author

berlic commented Aug 28, 2024

@yesnault Hi. Please reopen the issue. Not sure why the bot marks issues as completed while they are clearly not.

@yesnault yesnault reopened this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants