From c352901ce4fe35d56512b3f7e71d3ebefa819c79 Mon Sep 17 00:00:00 2001 From: esberglu Date: Wed, 15 Nov 2017 09:52:05 -0600 Subject: [PATCH] Use NoDBTestCase for powervm driver tests TestCase is being replaced by NoDBTestCase for the powervm driver test code. This will prevent running the database schema migrations unnecessarily and will let the developer know if the tests touch the DB when the test case is claiming that it shouldn't. Change-Id: I2b04b785c71c6f2cc825215e2773a00e85a67a89 --- nova/tests/unit/virt/powervm/disk/test_ssp.py | 2 +- nova/tests/unit/virt/powervm/tasks/test_storage.py | 2 +- nova/tests/unit/virt/powervm/tasks/test_vm.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/tests/unit/virt/powervm/disk/test_ssp.py b/nova/tests/unit/virt/powervm/disk/test_ssp.py index e64e90c44b6d..ab0b4f215cb9 100644 --- a/nova/tests/unit/virt/powervm/disk/test_ssp.py +++ b/nova/tests/unit/virt/powervm/disk/test_ssp.py @@ -35,7 +35,7 @@ FAKE_INST_UUID = uuidutils.generate_uuid(dashed=True) FAKE_INST_UUID_PVM = vm.get_pvm_uuid(mock.Mock(uuid=FAKE_INST_UUID)) -class TestSSPDiskAdapter(test.TestCase): +class TestSSPDiskAdapter(test.NoDBTestCase): """Unit Tests for the LocalDisk storage driver.""" def setUp(self): diff --git a/nova/tests/unit/virt/powervm/tasks/test_storage.py b/nova/tests/unit/virt/powervm/tasks/test_storage.py index 433d3d695f30..cf69f1f2ec36 100644 --- a/nova/tests/unit/virt/powervm/tasks/test_storage.py +++ b/nova/tests/unit/virt/powervm/tasks/test_storage.py @@ -19,7 +19,7 @@ from nova import test from nova.virt.powervm.tasks import storage as tf_stg -class TestStorage(test.TestCase): +class TestStorage(test.NoDBTestCase): def setUp(self): super(TestStorage, self).setUp() diff --git a/nova/tests/unit/virt/powervm/tasks/test_vm.py b/nova/tests/unit/virt/powervm/tasks/test_vm.py index 4124f67877c0..08a841c664f1 100644 --- a/nova/tests/unit/virt/powervm/tasks/test_vm.py +++ b/nova/tests/unit/virt/powervm/tasks/test_vm.py @@ -22,7 +22,7 @@ from nova import test from nova.virt.powervm.tasks import vm as tf_vm -class TestVMTasks(test.TestCase): +class TestVMTasks(test.NoDBTestCase): def setUp(self): super(TestVMTasks, self).setUp() self.apt = mock.Mock()