Comment 2 for bug 1005423

Revision history for this message
Prem Karat (prem-karat) wrote :

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-')
         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

Change-Id: I877122880085d1fd69abe1d6d5b730701084c4a9
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
* Fix assertRaises bug to match against exceptions.BadRequest instead
of exceptions.OverLimit which was causing this test case to fail.

Change-Id: I877122880085d1fd69abe1d6d5b730701084c4a9