Merge "placement: s/None/null/ in consumer conflict msg"
This commit is contained in:
commit
46ef5738ad
|
@ -640,7 +640,7 @@ def ensure_consumer(ctx, consumer_uuid, project_id, user_id,
|
|||
if consumer_generation is not None:
|
||||
raise webob.exc.HTTPConflict(
|
||||
_('consumer generation conflict - '
|
||||
'expected None but got %s') % consumer_generation)
|
||||
'expected null but got %s') % consumer_generation)
|
||||
# No such consumer. This is common for new allocations. Create the
|
||||
# consumer record
|
||||
try:
|
||||
|
|
|
@ -50,6 +50,21 @@ tests:
|
|||
response_strings:
|
||||
- JSON does not validate
|
||||
|
||||
- name: new version gen is not null no existing
|
||||
PUT: /allocations/22222222-2222-2222-2222-222222222222
|
||||
data:
|
||||
allocations:
|
||||
$ENVIRON['RP_UUID']:
|
||||
resources:
|
||||
DISK_GB: 10
|
||||
project_id: $ENVIRON['PROJECT_ID']
|
||||
user_id: $ENVIRON['USER_ID']
|
||||
consumer_generation: 5
|
||||
status: 409
|
||||
response_strings:
|
||||
- consumer generation conflict
|
||||
- expected null but got 5
|
||||
|
||||
- name: new version gen is None no existing
|
||||
PUT: /allocations/22222222-2222-2222-2222-222222222222
|
||||
data:
|
||||
|
|
Loading…
Reference in New Issue