Merge "Change partition name from string to integer"
This commit is contained in:
commit
48a2e5c311
@ -817,8 +817,8 @@ class ObjectReplicator(Daemon):
|
||||
self.logger.exception('ERROR creating %s' % obj_path)
|
||||
continue
|
||||
for partition in os.listdir(obj_path):
|
||||
if (override_partitions is not None
|
||||
and partition not in override_partitions):
|
||||
if (override_partitions is not None and partition.isdigit()
|
||||
and int(partition) not in override_partitions):
|
||||
continue
|
||||
|
||||
if (partition.startswith('auditor_status_') and
|
||||
|
@ -1401,10 +1401,10 @@ class TestObjectReplicator(unittest.TestCase):
|
||||
self.assertTrue(os.access(part_path, os.F_OK))
|
||||
self.replicator.replicate(override_devices=['sdb'])
|
||||
self.assertTrue(os.access(part_path, os.F_OK))
|
||||
self.replicator.replicate(override_partitions=['9'])
|
||||
self.replicator.replicate(override_partitions=[9])
|
||||
self.assertTrue(os.access(part_path, os.F_OK))
|
||||
self.replicator.replicate(override_devices=['sda'],
|
||||
override_partitions=['1'])
|
||||
override_partitions=[1])
|
||||
self.assertFalse(os.access(part_path, os.F_OK))
|
||||
|
||||
def test_delete_policy_override_params(self):
|
||||
|
Loading…
Reference in New Issue
Block a user