eykrehbein / strest

⚡️ CI-ready tests for REST APIs configured in YAML
MIT License
1.74k stars 59 forks source link

Unresolved Value() should error out #99

Closed finestructure closed 5 years ago

finestructure commented 5 years ago

Describe the bug Unresolved Value() parameters should error out.

Instead it exits with a 0 exit status:

[ Strest ] Found 1 test file(s)
[ Strest ] Schema validation: 1 of 1 file(s) passed

✔ Testing create_contract_1 succeeded (0.002s)

Status: undefined
Status Text: undefined

Headers:

undefined

Data:

undefined

[ Strest ] ✨  Done in 0.068s

To Reproduce Run -b batch.yml with the following files

batch.yml:

---
- tests/test.yml

test.yml

version: 1

requests:

  create_contract_1:
    url: Var(api_url)/v1/contract
    method: POST
    headers:
      Authorization: Bearer Value(login.access_token)
    data:
      json:
        name: Provider 1
    validate:
      code: 201
      json:
        id: Type(String)

Expected behavior Should exit != 0.