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

BadSchemaError trying to use redirect_query_params key in response #925

Closed Kijuoye closed 4 months ago

Kijuoye commented 4 months ago

As the documentation says, I tried to use the redirect_query_params key in response to test the implementation of an OpenID connect provider. However, I get a BadSchemaError as the key is unexpected.

test_name: Test /login endpoint

strict:
    - json:off

stages:
   - name: Get from /login redirect response
     request:
         ...
     response:
         status_code: 302
         redirect_query_params:      # Here, it says: Additional porperties are not allowed ('redirect_query_params' was unexpected)
             ....

This is esentially the yaml I'm using

michaelboulton commented 4 months ago

Tavern was actually initially made to test OpenID connect providers so it's kind of silly that there wasn't a test written for this :facepalm: Should now be fixed in 2.10.2