Incorrect exception raised during create image , when invalid Image Metadata is passed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Low
|
Prem Karat |
Bug Description
Our tempest test that validates a return error code when an invalid key-value pair for metadata is passed during Create Image fails for the following scenarios.
1. Blank key-value metadata
Steps to reproduce:
1. Create a server
2. Create an image of the above server and pass invalid metadata key value pair, for ex:
meta = {'': ''}
Expected Return Code: 400 BadRequest
Actual Return Code: 404 Not Found
Besides, in this case the snapshot image is created but the operation stays in Queued state.
2. Metadata that exceeds length limit
Steps to reproduce:
1. Create a server
2. Create an image of the above server and pass invalid metadata key value pair, for ex:
meta = {'a' * 260: 'b' * 260}
Expected Return Code: 413 OverLimit
Actual Return Code: 404 Not Found
Return an error when creating image with invalid metadata ... FAIL
=======
FAIL: Return an error when creating image with invalid metadata
-------
Traceback (most recent call last):
File "/opt/stack/
self.
AssertionError: Should raise 400 Bad Request if meta data is invalid
-------
tempest.config: INFO: Using tempest config file /opt/stack/
tempest.
tempest.
tempest.
tempest.
-------
-------
Return an error when creating image with meta data over 256 chars ... FAIL
=======
FAIL: Return an error when creating image with meta data over 256 chars
-------
Traceback (most recent call last):
File "/opt/stack/
self.
AssertionError: Should raise 413 Over Limit if meta data was too long
-------
tempest.config: INFO: Using tempest config file /opt/stack/
tempest.
tempest.
tempest.
tempest.
-------
-------
Ran 2 test in 51.507s
FAILED (failures=2)
description: | updated |
tags: | added: tempest |
Changed in nova: | |
assignee: | nobody → Prem Karat (prem-karat) |
Changed in nova: | |
status: | Triaged → Fix Committed |
affects: | nova → tempest |
Changed in tempest: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
I would expect the first situation to pass with a 2XX code and the second to fail with a 400.