taverntesting / tavern

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax
https://taverntesting.github.io/
MIT License
1.02k stars 192 forks source link

Enhance finally block to support referenced stages #924

Closed vtselikovsky closed 4 months ago

vtselikovsky commented 4 months ago

Hi there, could we consider implementing an option that allows including a reference to stages within the finally block? This would enable us to achieve something similar to the following:

finally:
  - type: ref
    id: some_common_final_stage

https://github.com/taverntesting/tavern/blob/7439490623e4a9dbf52bf621df19db0250793c35/tavern/_core/schema/tests.jsonschema.yaml#L511

michaelboulton commented 4 months ago

Should be possible in 2.10.3