Merge "[placement] Require at least one resource class in allocation"
This commit is contained in:
commit
e9daa28bae
@ -51,6 +51,7 @@ ALLOCATION_SCHEMA = {
|
|||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"minProperties": 1,
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^[0-9A-Z_]+$": {
|
"^[0-9A-Z_]+$": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
# Bug 1714072 describes a situation where a resource provider is present in the
|
# Bug 1714072 describes a situation where a resource provider is present in the
|
||||||
# body of an allocation, but the resources object is empty. There should be at
|
# body of an allocation, but the resources object is empty. There should be at
|
||||||
# least one resource class and value pair. If there is not a 400 response
|
# least one resource class and value pair. If there is not a 400 response
|
||||||
# should be returned. This gabbit file demonstrates the problem: a 500 on the final
|
# should be returned.
|
||||||
# test.
|
|
||||||
|
|
||||||
fixtures:
|
fixtures:
|
||||||
- APIFixture
|
- APIFixture
|
||||||
@ -59,5 +58,6 @@ tests:
|
|||||||
resources: {}
|
resources: {}
|
||||||
project_id: 42a32c07-3eeb-4401-9373-68a8cdca6784
|
project_id: 42a32c07-3eeb-4401-9373-68a8cdca6784
|
||||||
user_id: 66cb2f29-c86d-47c3-8af5-69ae7b778c70
|
user_id: 66cb2f29-c86d-47c3-8af5-69ae7b778c70
|
||||||
# This should be 400
|
status: 400
|
||||||
status: 500
|
response_strings:
|
||||||
|
- does not have enough properties
|
||||||
|
Loading…
Reference in New Issue
Block a user