[placement] Add gabbi coverage for an inventory change

There's a special case of changing inventories that we didn't have
gabbit coverage for: For an existing resource provider, we allow its
inventory to be changed to have a lower total than existing allocations
(See commit 09627f2a0b). There was no gabbi coverage for that case.
This adds it.

Change-Id: I34e104a766d4578f83a455b4b900ea50c9a6ec0f
This commit is contained in:
Chris Dent 2018-07-18 15:46:03 +01:00
parent eb4f65a795
commit 32034a93d3
1 changed files with 16 additions and 0 deletions

View File

@ -68,6 +68,22 @@ tests:
response_json_paths:
$.errors[0].code: placement.inventory.inuse
# We can change inventory in a way that makes existing allocations exceed the
# new capacity. This is allowed.
- name: change inventory despite capacity exceeded
PUT: /resource_providers/$ENVIRON['RP_UUID']/inventories
request_headers:
accept: application/json
content-type: application/json
data:
resource_provider_generation: 5
inventories:
DISK_GB:
total: 1019
VCPU:
total: 97
status: 200
- name: get total usages by project
GET: /usages?project_id=$ENVIRON['PROJECT_ID']
request_headers: