Fixed inconsistent end_marker
The listing of containers was inclusive whereas the listing of objects was exclusive. I searched and searched and only found end_marker usage with listings of objects so I changed the listings of containers to match that. Change-Id: Ia8eb66a7ceaef28c698e2d4e19dd5dfd9197a911
This commit is contained in:
@@ -1572,7 +1572,7 @@ class AccountBroker(DatabaseBroker):
|
||||
WHERE deleted = 0 AND """
|
||||
query_args = []
|
||||
if end_marker:
|
||||
query += ' name <= ? AND'
|
||||
query += ' name < ? AND'
|
||||
query_args.append(end_marker)
|
||||
if marker and marker >= prefix:
|
||||
query += ' name > ? AND'
|
||||
|
@@ -1814,9 +1814,9 @@ class TestAccountBroker(unittest.TestCase):
|
||||
self.assertEquals(listing[-1][0], '0/0099')
|
||||
|
||||
listing = broker.list_containers_iter(100, '', '0/0050', None, '')
|
||||
self.assertEquals(len(listing), 51)
|
||||
self.assertEquals(len(listing), 50)
|
||||
self.assertEquals(listing[0][0], '0/0000')
|
||||
self.assertEquals(listing[-1][0], '0/0050')
|
||||
self.assertEquals(listing[-1][0], '0/0049')
|
||||
|
||||
listing = broker.list_containers_iter(100, '0/0099', None, None, '')
|
||||
self.assertEquals(len(listing), 100)
|
||||
|
Reference in New Issue
Block a user