Merge "[placement] Increase test coverage"
This commit is contained in:
commit
3e02460e2e
@ -642,18 +642,57 @@ tests:
|
||||
openstack-api-version: placement 1.5
|
||||
status: 204
|
||||
|
||||
- name: get inventories after deletion
|
||||
GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
response_json_paths:
|
||||
$.resource_provider_generation: 7
|
||||
$.inventories: {}
|
||||
|
||||
- name: delete empty inventories
|
||||
DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
request_headers:
|
||||
openstack-api-version: placement 1.5
|
||||
status: 204
|
||||
|
||||
- name: get inventories after deletions
|
||||
GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
response_json_paths:
|
||||
$.resource_provider_generation: 8
|
||||
$.inventories: {}
|
||||
|
||||
- name: post an inventory again
|
||||
POST: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
data:
|
||||
resource_class: DISK_GB
|
||||
total: 2048
|
||||
reserved: 512
|
||||
min_unit: 10
|
||||
max_unit: 1024
|
||||
step_size: 10
|
||||
allocation_ratio: 1.0
|
||||
status: 201
|
||||
response_headers:
|
||||
location: $SCHEME://$NETLOC/resource_providers/$ENVIRON['RP_UUID']/inventories/DISK_GB
|
||||
response_json_paths:
|
||||
$.resource_provider_generation: 9
|
||||
$.total: 2048
|
||||
$.reserved: 512
|
||||
|
||||
- name: delete all inventory with put
|
||||
PUT: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
openstack-api-version: placement 1.4
|
||||
data:
|
||||
resource_provider_generation: 9
|
||||
inventories: {}
|
||||
response_json_paths:
|
||||
$.resource_provider_generation: 10
|
||||
$.inventories: {}
|
||||
status: 200
|
||||
|
||||
- name: get generation after deletion
|
||||
GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
response_json_paths:
|
||||
$.resource_provider_generation: 10
|
||||
$.inventories: {}
|
||||
|
||||
- name: delete inventories earlier version
|
||||
DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories
|
||||
request_headers:
|
||||
|
Loading…
Reference in New Issue
Block a user