Debian Codegraph @

blazar_tempest_plugin/tests/api/gabbits/hosts.yaml

raw
1 fixtures:
2 - AuthenticationFixture
3
4 defaults:
5 request_headers:
6 accept: application/json
7 content-type: application/json
8 X-Auth-Token: $ENVIRON['OS_TOKEN']
9
10 tests:
11 - name: get host name
12 GET: compute/v2.1/os-hypervisors
13 status: 200
14
15 - name: post new host with too long extra capability
16 POST: reservation/v1/os-hosts
17 data:
18 name: $HISTORY['get host name'].$RESPONSE['$.hypervisors[0].hypervisor_hostname']
19 extra_capability_key_should_be_shorter_than_64_ABCDEFGHIJKLMNOPQRSTUVWXYZ: "foo"
20 status: 400
21 response_strings:
22 - Extra capability key too long
23
24 - name: post new host
25 POST: reservation/v1/os-hosts
26 data:
27 name: $HISTORY['get host name'].$RESPONSE['$.hypervisors[0].hypervisor_hostname']
28 status: 201
29
30 - name: get new host
31 GET: reservation/v1/os-hosts
32 response_json_paths:
33 $.hosts.`len`: 1
34
35 - name: delete new host
36 DELETE: reservation/v1/os-hosts/$HISTORY['get new host'].$RESPONSE['$.hosts[0].id']
37 status: 204
38
39 - name: get no host
40 GET: reservation/v1/os-hosts
41 response_json_paths:
42 $.hosts.`len`: 0