[placement] avoid case issues microversions in gabbits
If a gabbi file sets a default microversion by setting a header 'OpenStack-API-Version' with a value like 'placement latest' and then later overrides that in an individual test with a header of 'openstack-api-version' the difference in case can lead to failure. In the best case the failure is consistent. In the worst case it can sometimes work, because the header shows up twice in the request, and the last header wins, order in the headers and the resulting list dependent on the vagrancies of python ordering. The solution is to always use the same case, so this change updates all use to be lowercase, to establish a precedent that future people will be able to use as an example. Note that gabbi is case sensitive here in part because of the implementation but also because it provides the control and possibility to test exactly this problem. Change-Id: I1e89e231cf0d46d211d360cda091b33520f85027 Closes-Bug: #1728934
This commit is contained in:
parent
219cfc8ad6
commit
069e5ec67c
@ -7,7 +7,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -5,7 +5,7 @@ defaults:
|
||||
request_headers:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
OpenStack-API-Version: placement 1.8
|
||||
openstack-api-version: placement 1.8
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -11,7 +11,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -9,7 +9,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -8,7 +8,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -6,7 +6,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.7
|
||||
openstack-api-version: placement 1.7
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -5,14 +5,14 @@ defaults:
|
||||
request_headers:
|
||||
x-auth-token: admin
|
||||
accept: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
- name: test microversion masks entire resource-classes endpoint with 404
|
||||
GET: /resource_classes
|
||||
request_headers:
|
||||
OpenStack-API-Version: placement 1.1
|
||||
openstack-api-version: placement 1.1
|
||||
content-type: application/json
|
||||
status: 404
|
||||
response_json_paths:
|
||||
@ -22,7 +22,7 @@ tests:
|
||||
desc: we want to get a 404 before a 415
|
||||
POST: /resource_classes
|
||||
request_headers:
|
||||
OpenStack-API-Version: placement 1.1
|
||||
openstack-api-version: placement 1.1
|
||||
content-type: text/plain
|
||||
data: data
|
||||
status: 404
|
||||
@ -31,7 +31,7 @@ tests:
|
||||
desc: we want to get a 415 when bad content type
|
||||
POST: /resource_classes
|
||||
request_headers:
|
||||
OpenStack-API-Version: placement 1.2
|
||||
openstack-api-version: placement 1.2
|
||||
content-type: text/plain
|
||||
data: data
|
||||
status: 415
|
||||
@ -125,7 +125,7 @@ tests:
|
||||
PUT: /resource_classes/VCPU
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: VCPU_ALTERNATE
|
||||
status: 400
|
||||
@ -139,7 +139,7 @@ tests:
|
||||
PUT: /resource_classes/VCPU
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: $ENVIRON['CUSTOM_RES_CLASS']
|
||||
status: 400
|
||||
@ -152,7 +152,7 @@ tests:
|
||||
PUT: /resource_classes/$ENVIRON['CUSTOM_RES_CLASS']
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: VCPU
|
||||
status: 400
|
||||
@ -173,7 +173,7 @@ tests:
|
||||
PUT: /resource_classes/CUSTOM_NFV_FOO
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: $ENVIRON['CUSTOM_RES_CLASS']
|
||||
status: 409
|
||||
@ -187,7 +187,7 @@ tests:
|
||||
PUT: /resource_classes/$ENVIRON['CUSTOM_RES_CLASS']
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: CUSTOM_NFV_BAR
|
||||
status: 200
|
||||
@ -252,7 +252,7 @@ tests:
|
||||
PUT: /resource_classes/$ENVIRON['CUSTOM_RES_CLASS']
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
OpenStack-API-Version: placement 1.6
|
||||
openstack-api-version: placement 1.6
|
||||
data:
|
||||
name: *name_exceeds_max_length_check
|
||||
status: 400
|
||||
|
@ -7,7 +7,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
content-type: application/json
|
||||
accept: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
@ -41,7 +41,7 @@ tests:
|
||||
- name: list resource providers providing resources filter before API 1.4
|
||||
GET: /resource_providers?resources=VCPU:1
|
||||
request_headers:
|
||||
OpenStack-API-Version: placement 1.3
|
||||
openstack-api-version: placement 1.3
|
||||
status: 400
|
||||
response_strings:
|
||||
- 'Invalid query string parameters'
|
||||
|
@ -14,7 +14,7 @@ defaults:
|
||||
x-auth-token: admin
|
||||
content-type: application/json
|
||||
accept: application/json
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
|
@ -5,7 +5,7 @@ fixtures:
|
||||
defaults:
|
||||
request_headers:
|
||||
x-auth-token: admin
|
||||
OpenStack-API-Version: placement latest
|
||||
openstack-api-version: placement latest
|
||||
|
||||
tests:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user