Closed rdejuana closed 9 months ago
I got the following to work
---
- config:
- testset: "Admin app tests"
- generators:
- 'apikey': {type: 'env_string', 'string': "$APIKEY"}
- test:
- name: "Fail without authentication"
- url: "/admin/users/list"
- expected_status: [400]
- test:
- generator_binds: {apikey: apikey}
- name: "Pass with authentication"
- url: "/admin/users/list"
- headers: {template: {"Authorization": "Bearer $apikey"}}
- expected_status: [200]
I think it's because of this line in the documentation:
Currently, templating is only supported for the request body, URL, and headers. There are technical challenges adding it everywhere, it's coming as part of a rewrite of framework internals.
Any update on if this is planned to change at least for authentication values any time soon?
howdy, I've been combing the docs and code, is there a way to use environment variables for basic auth creds? I have something like this. Am I missing something?
thank you!