Esempio n. 1
0
 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_stop_db = couch_service.CouchbaseApp.stop_db
     self.origin_start_db = couch_service.CouchbaseApp.start_db
     operating_system.get_ip_address = Mock()
Esempio n. 2
0
 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_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
     self.origin_complete_install = \
         couch_service.CouchbaseApp.complete_install_or_restart
     operating_system.get_ip_address = MagicMock()
Esempio n. 3
0
    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()