tempest.api.object_storage.test_object_slo.ObjectSloTest.test_delete_large_object should check the "Response Status" in the "Response Body"

Bug #1264064 reported by Masayuki Igawa
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Unassigned

Bug Description

Swift docs[1] says:
------------------------------
The response is similar to bulk deletes as in every response will be a 200 OK and you must parse the response body for actual results.
------------------------------
However, tempest.api.object_storage.test_object_slo.ObjectSloTest.test_delete_large_object doesn't check it.
As a result, misleading errors occurred like this:
-------------------------------------------
2013-12-24 13:46:13.183 | Traceback (most recent call last):
2013-12-24 13:46:13.183 | File "tempest/api/object_storage/test_object_slo.py", line 193, in test_delete_large_object
2013-12-24 13:46:13.183 | self.assertEqual(int(resp['x-container-object-count']), 0)
2013-12-24 13:46:13.184 | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 324, in assertEqual
2013-12-24 13:46:13.184 | self.assertThat(observed, matcher, message)
2013-12-24 13:46:13.185 | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 414, in assertThat
2013-12-24 13:46:13.185 | raise MismatchError(matchee, matcher, mismatch, verbose)
2013-12-24 13:46:13.185 | MismatchError: 3 != 0
-------------------------------------------
http://logs.openstack.org/23/62923/4/check/check-tempest-dsvm-postgres-full/4e48a17/console.html

[1] http://docs.openstack.org/developer/swift/misc.html#module-swift.common.middleware.bulk

Masayuki Igawa (igawa)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/64011

Changed in tempest:
assignee: nobody → Masayuki Igawa (igawa)
status: New → In Progress
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Actually, there are lots of invalid assertions for resp, that is always 200.
Fix should contain body parser method.

Successful answer isn't a json-like, but errored is json-like.
This should be considered while writing method.

Revision history for this message
Masayuki Igawa (igawa) wrote :

@Valeriy: Thank you for your advise! I'll update my patch.

Revision history for this message
Yaroslav Lobankov (ylobankov) wrote :

The proposed patch (https://review.openstack.org/#/c/64011/) for this bug is abandoned, but the bug status is "In progress". Moving the status back to "New".

Changed in tempest:
status: In Progress → New
assignee: Masayuki Igawa (igawa) → nobody
Changed in tempest:
status: New → Confirmed
Revision history for this message
Daniel Mellado (daniel-mellado) wrote :

Is this still an issue?

Revision history for this message
Masayuki Igawa (igawa) wrote :
Changed in tempest:
status: Confirmed → Fix Committed
Revision history for this message
Masayuki Igawa (igawa) wrote :

I'm actually not sure 'Fix Committed' is the best status of this. But I think it's better than 'Confirmed'.

Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

A new Tempest has been released after this bug fixed. So this should be marked as Released.

Changed in tempest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.