def setUp(self): super(GuestAgentCouchbaseManagerTest, self).setUp() self.context = TroveContext() self.manager = couch_manager.Manager() self.packages = 'couchbase-server' self.origin_CouchbaseAppStatus = couch_service.CouchbaseAppStatus self.origin_format = volume.VolumeDevice.format self.origin_mount = volume.VolumeDevice.mount self.origin_mount_points = volume.VolumeDevice.mount_points self.origin_stop_db = couch_service.CouchbaseApp.stop_db self.origin_start_db = couch_service.CouchbaseApp.start_db self.origin_restart = couch_service.CouchbaseApp.restart self.origin_install_if = couch_service.CouchbaseApp.install_if_needed netutils.get_my_ipv4 = MagicMock()
def setUp(self): super(GuestAgentCouchbaseManagerTest, self).setUp() self.context = trove_testtools.TroveTestContext(self) self.manager = couch_manager.Manager() self.packages = 'couchbase-server' app_patcher = patch.multiple( couch_service.CouchbaseApp, stop_db=DEFAULT, start_db=DEFAULT, restart=DEFAULT) self.addCleanup(app_patcher.stop) app_patcher.start() netutils_patcher = patch.object(netutils, 'get_my_ipv4') self.addCleanup(netutils_patcher.stop) netutils_patcher.start()