[GCE] Use NoDBTestCase for nova tests

Currently we use nova.test.TestCase which causes db access and
test failure sometimes. Since we don't require database access
in gce nova testcases we can use NoDBTestCase instead.

Change-Id: I47546695ba8a69e494c677d9e542768f34e51250
This commit is contained in:
Sanket 2017-09-23 00:06:36 +05:30
parent d6f6913ee2
commit 3e9cad24ba
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ from nova.virt.gce.driver import GCEDriver
DATA_DIR = os.path.dirname(os.path.abspath(__file__)) + '/data'
class GCENovaTestCase(test.TestCase):
class GCENovaTestCase(test.NoDBTestCase):
@mock.patch('nova.virt.gce.driver.gceutils.get_machines_info')
@mock.patch('nova.virt.gce.driver.gceutils.get_gce_service')
def setUp(self, mock_service, mock_machine_info):