~cypheon/dronecov

ref: faef64e04f38bfdbc5c5e0ba725aee1d677385c0 dronecov/tests/test_auth.tavern.yaml -rw-r--r-- 695 bytes
faef64e0 — Johann Rudloff Add server. 5 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