Make api_samples tests use simple cell environment
The api_samples tests depend on a very static environment where we use the SpawnIsSynchronous fixture. This is somewhat at odds with the locking used in the CellDatabase fixture, which will necessarily recurse at times. Since the api_samples tests are already a bit naive in the service layout, and since they don't care about cells things, we do some monkeywork here to make them use the SingleCellSimple fixture instead of a full-blown multi-cell environment. Change-Id: If1138331f3a46f5aed87e898ce19879a787d435f
This commit is contained in:
@@ -347,7 +347,7 @@ class TestCase(testtools.TestCase):
|
||||
svc = self.useFixture(
|
||||
nova_fixtures.ServiceFixture(name, host, **kwargs))
|
||||
|
||||
if name == 'compute':
|
||||
if name == 'compute' and self.USES_DB:
|
||||
ctxt = context.get_context()
|
||||
cell = self.cell_mappings[kwargs.pop('cell', CELL1_NAME)]
|
||||
hm = objects.HostMapping(context=ctxt,
|
||||
|
||||
Reference in New Issue
Block a user