~cypheon/dronecov

ref: 2ddc7132c0715a5ac2c1fc48aa3f4e14bce09960 dronecov/tests/test_auth.tavern.yaml -rw-r--r-- 695 bytes
2ddc7132 — Johann Rudloff Update SQLalchemy version, fix tavern version. 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 invlaid 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