Variable in skip when on test
lvijnck opened this issue · 2 comments
I was trying to do something along the lines of the following code snippet, i.e., conditionally disable a step of my test. This seems to not interpolate the vars.
test_name: Dummy
stages:
- name: Model call without authentication header
skip: !bool "{tavern.env_vars.SKIP}
request:
...
Currently isn't very clear from the docs but just having skip
in a stage will cause it to be skipped no matter what the value is. Adding interpolation would be something extra that would need to be added.
This is fixed with the caveat that any files that are included need to be in .yaml format (not json) and any possible format variables have the !raw
tag before them, eg https://github.com/taverntesting/tavern/blob/9bdb1060017dae8a61048cbebf63c3fa6baf53e4/tests/integration/881_2.yaml . This is because it is an intended feature of Tavern that included files are normally formatted