Adapt tests to new messages from jsonschema 4.23.0
In the new jsonschema version couple of error messages are changed. As the tests should work with both old and the new jsonschema version the effected tests are relaxed to accept both error message. See https://review.opendev.org/c/openstack/requirements/+/925059 for the version bump patch where the tests are failing Change-Id: I21e5f5f72a46560f25d254e569b8d5cd15126fda
This commit is contained in:
@@ -63,7 +63,8 @@ tests:
|
||||
status: 400
|
||||
response_strings:
|
||||
- JSON does not validate
|
||||
- does not have enough properties
|
||||
# jsonschema < 4.23.0 jsonschema >= 4.23.0
|
||||
- "/(does not have enough properties)|(should be non-empty)/"
|
||||
|
||||
- name: put unused field
|
||||
PUT: /allocations/a0b15655-273a-4b3d-9792-2e579b7d5ad9
|
||||
|
||||
@@ -62,7 +62,8 @@ tests:
|
||||
user_id: 66cb2f29-c86d-47c3-8af5-69ae7b778c70
|
||||
status: 400
|
||||
response_strings:
|
||||
- does not have enough properties
|
||||
# jsonschema < 4.23.0 jsonschema >= 4.23.0
|
||||
- "/(does not have enough properties)|(should be non-empty)/"
|
||||
|
||||
# The next two tests confirm that the bug identified by
|
||||
# this file's name is not present in the PUT /allocations/{consumer_uuid}
|
||||
@@ -94,4 +95,5 @@ tests:
|
||||
user_id: 66cb2f29-c86d-47c3-8af5-69ae7b778c70
|
||||
status: 400
|
||||
response_strings:
|
||||
- does not have enough properties
|
||||
# jsonschema < 4.23.0 jsonschema >= 4.23.0
|
||||
- "/(does not have enough properties)|(should be non-empty)/"
|
||||
|
||||
@@ -81,8 +81,8 @@ tests:
|
||||
user_id: 8c974f9a-f266-42f7-8613-a8017cbfb87F
|
||||
project_id: b2e599e0-ded8-47fd-b8ab-ceb7fca578bd
|
||||
status: 400
|
||||
response_json_paths:
|
||||
$.errors[0].detail: "/JSON does not validate: {} does not have enough properties/"
|
||||
response_json_paths: # jsonschema < 4.23.0 jsonschema >= 4.23.0
|
||||
$.errors[0].detail: "/JSON does not validate: {} (does not have enough properties)|(should be non-empty)/"
|
||||
|
||||
- name: post allocation with results
|
||||
POST: /allocations
|
||||
|
||||
Reference in New Issue
Block a user