Merge "functional: Don't inherit from 'ProviderUsageBaseTestCase'"

This commit is contained in:
Zuul 2020-09-08 08:24:36 +00:00 committed by Gerrit Code Review
commit b75e689864
1 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,7 @@ from nova.tests.functional import integrated_helpers
@ddt.ddt
class TestColdMigrationUsage(integrated_helpers.ProviderUsageBaseTestCase):
class TestColdMigrationUsage(integrated_helpers._IntegratedTestBase):
"""Reproducer for bug #1879878.
Demonstrate the possibility of races caused by running the resource
@ -27,16 +27,20 @@ class TestColdMigrationUsage(integrated_helpers.ProviderUsageBaseTestCase):
reverted and dropping the claim for that migration on the source or
destination host, respectively.
"""
compute_driver = 'fake.MediumFakeDriver'
microversion = 'latest'
def setUp(self):
self.flags(compute_driver=self.compute_driver)
super().setUp()
self.ctxt = nova_context.get_admin_context()
def _setup_compute_service(self):
# Start two computes so we can migrate between them.
self._start_compute('host1')
self._start_compute('host2')
self.ctxt = nova_context.get_admin_context()
def _create_server(self):
"""Creates and return a server along with a source host and target
host.