示例#1
0
    def setUp(self):
        self.master = fakemaster.make_master(testcase=self,
                                             wantMq=True,
                                             wantData=True,
                                             wantDb=True)

        # set the worker port to a loopback address with unspecified
        # port
        self.pbmanager = self.master.pbmanager = pbmanager.PBManager()
        self.pbmanager.setServiceParent(self.master)

        # remove the fakeServiceParent from fake service hierarchy, and replace by a real one
        yield self.master.workers.disownServiceParent()
        self.workers = self.master.workers = workermanager.WorkerManager(
            self.master)
        self.workers.setServiceParent(self.master)

        self.botmaster = botmaster.BotMaster()
        self.botmaster.setServiceParent(self.master)

        self.master.status = master.Status()
        self.master.status.setServiceParent(self.master)
        self.master.botmaster = self.botmaster
        self.master.data.updates.workerConfigured = lambda *a, **k: None
        yield self.master.startService()

        self.buildworker = None
        self.port = None
        self.workerworker = None
        self.connector = None
        self._detach_deferreds = []

        # patch in our FakeBuilder for the regular Builder class
        self.patch(botmaster, 'Builder', FakeBuilder)
示例#2
0
    def setUp(self):
        self.setUpTestReactor()
        self.master = fakemaster.make_master(self,
                                             wantMq=True,
                                             wantData=True,
                                             wantDb=True)
        # set the worker port to a loopback address with unspecified
        # port
        self.pbmanager = self.master.pbmanager = pbmanager.PBManager()
        yield self.pbmanager.setServiceParent(self.master)

        # remove the fakeServiceParent from fake service hierarchy, and replace
        # by a real one
        yield self.master.workers.disownServiceParent()
        self.workers = self.master.workers = workermanager.WorkerManager(
            self.master)
        yield self.workers.setServiceParent(self.master)

        self.botmaster = botmaster.BotMaster()
        yield self.botmaster.setServiceParent(self.master)

        self.master.botmaster = self.botmaster
        self.master.data.updates.workerConfigured = lambda *a, **k: None
        yield self.master.startService()

        self.buildworker = None
        self.port = None
        self.workerworker = None

        # patch in our FakeBuilder for the regular Builder class
        self.patch(botmaster, 'Builder', FakeBuilder)

        self.client_connection_string_tpl = r"tcp:host=127.0.0.1:port={port}"

        self.tmpdirs = set()
示例#3
0
    def setUp(self):
        self.master = fakemaster.make_master(testcase=self, wantMq=True,
                                             wantData=True, wantDb=True)

        # set the slave port to a loopback address with unspecified
        # port
        self.pbmanager = self.master.pbmanager = pbmanager.PBManager()
        self.pbmanager.setServiceParent(self.master)

        self.buildslaves = self.master.buildslaves = bslavemanager.BuildslaveManager(self.master)
        self.buildslaves.setServiceParent(self.master)

        self.botmaster = botmaster.BotMaster(self.master)
        self.botmaster.setServiceParent(self.master)

        self.master.status = master.Status(self.master)
        self.master.botmaster = self.botmaster
        self.master.data.updates.buildslaveConfigured = lambda *a, **k: None
        yield self.master.startService()

        self.buildslave = None
        self.port = None
        self.slavebuildslave = None
        self.connector = None
        self._detach_deferreds = []

        # patch in our FakeBuilder for the regular Builder class
        self.patch(botmaster, 'Builder', FakeBuilder)
示例#4
0
    def setUp(self):
        self.master = fakemaster.make_master(testcase=self,
                                             wantMq=True,
                                             wantData=True)
        self.master.mq = self.master.mq
        self.buildslaves = bslavemanager.BuildslaveManager(self.master)
        # slaves expect a botmaster as well as a manager.
        self.botmaster = botmaster.BotMaster(self.master)
        self.master.botmaster = self.botmaster

        self.new_config = mock.Mock()
        self.buildslaves.startService()
示例#5
0
    def setUp(self):
        self.master = fakemaster.make_master(testcase=self,
                                             wantMq=True, wantData=True)
        self.master.mq = self.master.mq
        self.workers = workermanager.WorkerManager(self.master)
        self.workers.setServiceParent(self.master)
        # workers expect a botmaster as well as a manager.
        self.master.botmaster.disownServiceParent()
        self.botmaster = botmaster.BotMaster()
        self.master.botmaster = self.botmaster
        self.master.botmaster.setServiceParent(self.master)

        self.new_config = mock.Mock()
        self.workers.startService()
示例#6
0
    def setUp(self):
        self.master = fakemaster.make_master()
        # set the slave port to a loopback address with unspecified
        # port
        self.pbmanager = self.master.pbmanager = pbmanager.PBManager()
        self.pbmanager.startService()

        self.botmaster = botmaster.BotMaster(self.master)
        self.botmaster.startService()

        self.master.status = master.Status(self.master)

        self.buildslave = None
        self.port = None
        self.slavebuildslave = None
        self.connector = None
        self.detach_d = None