Merge "[placement] Require at least one allocation when PUT"
This commit is contained in:
@@ -34,6 +34,7 @@ ALLOCATION_SCHEMA = {
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allocations": {
|
"allocations": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@@ -54,6 +54,16 @@ tests:
|
|||||||
response_json_paths:
|
response_json_paths:
|
||||||
$.errors[0].title: Bad Request
|
$.errors[0].title: Bad Request
|
||||||
|
|
||||||
|
- name: put an allocation empty list
|
||||||
|
PUT: /allocations/599ffd2d-526a-4b2e-8683-f13ad25f9958
|
||||||
|
request_headers:
|
||||||
|
content-type: application/json
|
||||||
|
data:
|
||||||
|
allocations: []
|
||||||
|
status: 400
|
||||||
|
response_strings:
|
||||||
|
- "Failed validating 'minItems'"
|
||||||
|
|
||||||
- name: put an allocation violate schema
|
- name: put an allocation violate schema
|
||||||
PUT: /allocations/599ffd2d-526a-4b2e-8683-f13ad25f9958
|
PUT: /allocations/599ffd2d-526a-4b2e-8683-f13ad25f9958
|
||||||
request_headers:
|
request_headers:
|
||||||
|
Reference in New Issue
Block a user