Esempio n. 1
0
    def test_worker_registered_to_machine(self):
        worker = self.createLocalWorker('worker1', machine_name='machine1')
        machine = Machine('machine1')

        config_dict = {
            'builders': [
                BuilderConfig(
                    name="builder1",
                    workernames=["worker1"],
                    factory=BuildFactory(),
                ),
            ],
            'workers': [worker],
            'machines': [machine],
            'protocols': {
                'null': {}
            },
            'multiMaster':
            True,
        }

        yield self.getMaster(config_dict)

        self.assertIs(worker.machine, machine)
Esempio n. 2
0
 def createMachine(self, name, configured=True, **kwargs):
     machine = Machine(name)
     if configured:
         yield machine.setServiceParent(self.master.machine_manager)
     return machine
Esempio n. 3
0
 def createMachine(self, name, configured=True, **kwargs):
     machine = Machine(name)
     if configured:
         yield machine.setServiceParent(self.master.machine_manager)
     return machine