Merge "Make dict.keys() PY3 compatible"
This commit is contained in:
commit
46f7142313
@ -125,7 +125,7 @@ class BackupManager(manager.SchedulerDependentManager):
|
|||||||
|
|
||||||
if 'default' not in self.volume_managers:
|
if 'default' not in self.volume_managers:
|
||||||
# For multi-backend we just pick the top of the list.
|
# For multi-backend we just pick the top of the list.
|
||||||
return self.volume_managers.keys()[0]
|
return next(iter(self.volume_managers))
|
||||||
|
|
||||||
return 'default'
|
return 'default'
|
||||||
|
|
||||||
|
@ -348,6 +348,13 @@ class BackupTestCase(BaseBackupTest):
|
|||||||
def test_is_working(self):
|
def test_is_working(self):
|
||||||
self.assertTrue(self.backup_mgr.is_working())
|
self.assertTrue(self.backup_mgr.is_working())
|
||||||
|
|
||||||
|
def test_get_volume_backend(self):
|
||||||
|
backup_mgr = manager.BackupManager()
|
||||||
|
backup_mgr.volume_managers = {'backend1': 'backend1',
|
||||||
|
'backend2': 'backend2'}
|
||||||
|
backend = backup_mgr._get_volume_backend(allow_null_host=True)
|
||||||
|
self.assertIn(backend, backup_mgr.volume_managers)
|
||||||
|
|
||||||
def test_cleanup_incomplete_backup_operations_with_exceptions(self):
|
def test_cleanup_incomplete_backup_operations_with_exceptions(self):
|
||||||
"""Test cleanup resilience in the face of exceptions."""
|
"""Test cleanup resilience in the face of exceptions."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user