summaryrefslogtreecommitdiff
path: root/nova/tests/functional/api/openstack/placement/gabbits/confirm-auth.yaml
blob: d4e17f6ef3914e6158d6c5a0ce423ccf219bc4de (plain)
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
#
# Confirm that the noauth handler is causing a 401 when no fake
# token is provided.
#

fixtures:
    - APIFixture

defaults:
    request_headers:
        accept: application/json

tests:
    - name: no token gets 200 at root
      GET: /
      status: 200

    - name: with token 200 at root
      GET: /
      request_headers:
          x-auth-token: admin:admin
      status: 200

    - name: no token gets 401
      GET: /resource_providers
      status: 401

    - name: with token 200
      GET: /resource_providers
      request_headers:
          x-auth-token: admin:admin
      status: 200