~cypheon/dronecov

ref: d744cf8fd58ec9dfd03fafc297f488bc218fdaf7 dronecov/tests/test_auth.tavern.yaml -rw-r--r-- 695 bytes
d744cf8f — Johann Rudloff Fix typo in tests. 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
---
test_name: Access without token and with invalid token is rejectd

stages:
  - name: 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

    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