diff --git a/trove/tests/unittests/guestagent/test_dbaas.py b/trove/tests/unittests/guestagent/test_dbaas.py index c67eb73593..4f54a15702 100644 --- a/trove/tests/unittests/guestagent/test_dbaas.py +++ b/trove/tests/unittests/guestagent/test_dbaas.py @@ -1870,7 +1870,8 @@ class BaseDbStatusTest(testtools.TestCase): InstanceServiceStatus.find_by(instance_id=self.FAKE_ID).delete() dbaas.CONF.guest_id = None - def test_begin_install(self): + @patch.object(operating_system, 'write_file') + def test_begin_install(self, mock_write_file): base_db_status = BaseDbStatus() base_db_status.begin_install() diff --git a/trove/tests/unittests/guestagent/test_vertica_manager.py b/trove/tests/unittests/guestagent/test_vertica_manager.py index 74951f3e68..455a5b4ff7 100644 --- a/trove/tests/unittests/guestagent/test_vertica_manager.py +++ b/trove/tests/unittests/guestagent/test_vertica_manager.py @@ -19,6 +19,7 @@ from testtools.matchers import Is from trove.common.context import TroveContext from trove.common.exception import DatastoreOperationNotSupported from trove.common import instance as rd_instance +from trove.guestagent.common import operating_system from trove.guestagent.datastore.experimental.vertica.manager import Manager from trove.guestagent.datastore.experimental.vertica.service import ( VerticaAppStatus) @@ -251,7 +252,8 @@ class GuestAgentManagerTest(trove_testtools.TestCase): test_resize_fs = volume.VolumeDevice.resize_fs.call_args_list[0] test_resize_fs.assert_called_with('/var/lib/vertica') - def test_cluster_complete(self): + @patch.object(operating_system, 'write_file') + def test_cluster_complete(self, mock_write_file): mock_set_status = MagicMock() self.manager.appStatus.set_status = mock_set_status self.manager.appStatus._get_actual_db_status = MagicMock(