~cypheon/dronecov

ref: daf17a6193508decad5fd450fe9043fc86032bde dronecov/tests/test_auth.tavern.yaml -rw-r--r-- 749 bytes
daf17a61 — Johann Rudloff Add IDs to all test stages in preparation for tavern upgrade. 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
test_name: Access without token and with invalid token is rejectd

stages:
  - name: POST without token
    id: post_without_token

    request:
      url: '{host}/testuser/testrepo/master/coverage'
      method: POST
      headers:
        content-type: application/json
      json:
        coverage_total: 50
        build_number: 50

    response:
      status_code: 401


  - name: POST with invalid token
    id: post_invalid_token

    request:
      url: '{host}/testuser/testrepo/master/coverage'
      method: POST
      headers:
        content-type: application/json
        authorization: 'Bearer zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
      json:
        coverage_total: 50
        build_number: 50

    response:
      status_code: 403