Fix provided is in test_create_image_specify_metadata_over_limits(self):
# Return an error when creating image with meta data over 256 chars snapshot_name = rand_name('test-snap-')
meta = {'a' * 260: 'b' * 260}
- self.assertRaises(exceptions.OverLimit, self.client.create_image,
+ self.assertRaises(exceptions.BadRequest, self.client.create_image, self.server['id'], snapshot_name, meta)
Expected Return Code: 413 OverLimit
Actual Return Code: 404 Not Found
Expected Return cod was OverLimit but it should be BadRequest.
All 3 test cases passes now. Fix submitted upstream
Change I87712288: Fix to enable negative test image_invalid_metadata
Fix to enable negative test image_invalid_metadata
Remove skips in test_images_oneserver
* Remove skip test_create_image_specify_invalid_metadata
* Fix assertRaises bug to match against exceptions.BadRequest instead
of exceptions.OverLimit which was causing this test case to fail.
This bug is fixed now and the tests pass.
Fix provided is in test_create_ image_specify_ metadata_ over_limits( self):
# Return an error when creating image with meta data over 256 chars
snapshot_ name = rand_name( 'test-snap- ') es(exceptions. OverLimit, self.client. create_ image, es(exceptions. BadRequest, self.client. create_ image,
self. server[ 'id'], snapshot_name, meta)
meta = {'a' * 260: 'b' * 260}
- self.assertRais
+ self.assertRais
Expected Return Code: 413 OverLimit
Actual Return Code: 404 Not Found
Expected Return cod was OverLimit but it should be BadRequest.
All 3 test cases passes now. Fix submitted upstream
Change I87712288: Fix to enable negative test image_invalid_ metadata
Change-Id: I877122880085d1 fd69abe1d6d5b73 0701084c4a9
Owner Prem Karat
Project openstack/tempest
Branch master
Topic bug/1005423
Uploaded Apr 25, 2013 5:05 PM
Updated Apr 25, 2013 5:05 PM
Status Review in Progress
Fix to enable negative test image_invalid_ metadata
Remove skips in test_images_ oneserver
* Remove skip test_create_ image_specify_ invalid_ metadata BadRequest instead OverLimit which was causing this test case to fail.
* Fix assertRaises bug to match against exceptions.
of exceptions.
Change-Id: I877122880085d1 fd69abe1d6d5b73 0701084c4a9