Bug #42868
closedTempest test failure test_list_containers_with_limit_and_marker
0%
Description
The tempest test test_list_containers_with_limit_and_marker fails in Teuthology:
Captured traceback:
~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/ubuntu/cephtest/tempest/tempest/api/object_storage/test_account_services.py", line 216, in test_list_containers_with_limit_and_marker
str(container_list))
File "/home/ubuntu/cephtest/tempest/.tox/venv/lib/python2.7/site-packages/unittest2/case.py", line 1227, in assertLessEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/home/ubuntu/cephtest/tempest/.tox/venv/lib/python2.7/site-packages/unittest2/case.py", line 690, in fail
raise self.failureException(msg)
AssertionError: 6 not less than or equal to 0 : ['tempest-a--176082743', 'tempest-b--304031945', 'tempest-c--996898789', 'tempest-d--375280079', 'tempest-e--1334323715', 'tempest-f--721847914']
This happens because the limit in the test is set to a random int between 0 and the number of items in the container. In my test, the random number chosen is zero.
In RGWListBuckets_ObjStore_SWIFT::get_params(), 0 is a legit setting for limit (it fails if limit is < 0), and in RGWListBuckets::execute() the checks allow limit to be zero. However in RGWUserCtl::list_buckets(), if we pass in 0, it uses defaults instead. This means that we return everything instead of 0.
Proposed solution is to move the default checking up a layer in the API, allowing 0 to be passed in.
Updated by Yehuda Sadeh over 4 years ago
Updated by Casey Bodley over 4 years ago
- Status changed from In Progress to Resolved