Fixed tests due to updated oslo.config
Change-Id: Ib7923543862275629d86a0fa76baa88722493bad Closes-Bug: #1691132
This commit is contained in:
parent
a783a7442b
commit
2c65bf7f1a
|
@ -388,7 +388,7 @@ class TestStore(base.StoreBaseTest,
|
||||||
|
|
||||||
@mock.patch.object(MockRados.Rados, 'connect')
|
@mock.patch.object(MockRados.Rados, 'connect')
|
||||||
def test_rados_connect_timeout(self, mock_rados_connect):
|
def test_rados_connect_timeout(self, mock_rados_connect):
|
||||||
socket_timeout = 1.5
|
socket_timeout = 1
|
||||||
self.config(rados_connect_timeout=socket_timeout)
|
self.config(rados_connect_timeout=socket_timeout)
|
||||||
self.store.configure()
|
self.store.configure()
|
||||||
with self.store.get_connection('conffile', 'rados_id'):
|
with self.store.get_connection('conffile', 'rados_id'):
|
||||||
|
|
|
@ -1900,22 +1900,12 @@ class TestMultipleContainers(base.StoreBaseTest):
|
||||||
self.assertEqual(expected, actual)
|
self.assertEqual(expected, actual)
|
||||||
|
|
||||||
def test_get_container_name_with_negative_seed(self):
|
def test_get_container_name_with_negative_seed(self):
|
||||||
self.config(swift_store_multiple_containers_seed=-1)
|
self.assertRaises(ValueError, self.config,
|
||||||
self.store = swift.SingleTenantStore(self.conf)
|
swift_store_multiple_containers_seed=-1)
|
||||||
|
|
||||||
test_image_id = 'random_id'
|
|
||||||
self.assertRaises(exceptions.BadStoreConfiguration,
|
|
||||||
self.store.get_container_name, test_image_id,
|
|
||||||
'default_container')
|
|
||||||
|
|
||||||
def test_get_container_name_with_seed_beyond_max(self):
|
def test_get_container_name_with_seed_beyond_max(self):
|
||||||
self.config(swift_store_multiple_containers_seed=33)
|
self.assertRaises(ValueError, self.config,
|
||||||
self.store = swift.SingleTenantStore(self.conf)
|
swift_store_multiple_containers_seed=33)
|
||||||
|
|
||||||
test_image_id = 'random_id'
|
|
||||||
self.assertRaises(exceptions.BadStoreConfiguration,
|
|
||||||
self.store.get_container_name, test_image_id,
|
|
||||||
'default_container')
|
|
||||||
|
|
||||||
def test_get_container_name_with_max_seed(self):
|
def test_get_container_name_with_max_seed(self):
|
||||||
self.config(swift_store_multiple_containers_seed=32)
|
self.config(swift_store_multiple_containers_seed=32)
|
||||||
|
|
|
@ -83,7 +83,8 @@ class TestStore(base.StoreBaseTest,
|
||||||
super(TestStore, self).setUp()
|
super(TestStore, self).setUp()
|
||||||
|
|
||||||
vm_store.Store.CHUNKSIZE = 2
|
vm_store.Store.CHUNKSIZE = 2
|
||||||
self.config(default_store='vmware', stores=['vmware'])
|
default_store = VMWARE_DS['default_store']
|
||||||
|
self.config(default_store=default_store, stores=['vmware'])
|
||||||
backend.register_opts(self.conf)
|
backend.register_opts(self.conf)
|
||||||
self.config(group='glance_store',
|
self.config(group='glance_store',
|
||||||
vmware_server_username='admin',
|
vmware_server_username='admin',
|
||||||
|
|
Loading…
Reference in New Issue