Esempio n. 1
0
    def setUp(self):
        cfg_manager = ConfigurationManager.ConfigurationManager()
        cfg_manager.append_module(configuration_module)

        self.fake_client = FakeClient()
        self.fake_locator = FakeLocator((self.fake_client, ))
        locator = EasyLocator.EasyLocator(
            CoordAddress.CoordAddress('mach', 'inst', 'serv'),
            self.fake_locator)

        self.experiment_instance_id = ExperimentInstanceId(
            "exp_inst", "exp_name", "exp_cat")
        self.experiment_coord_address = CoordAddress.CoordAddress.translate_address(
            'myserver:myinstance@mymachine')

        cfg_manager._set_value(
            'laboratory_assigned_experiments', {
                'exp_inst:exp_name@exp_cat': {
                    'coord_address':
                    'myserver1:myinstance@mymachine',
                    'checkers': (
                        ('WebcamIsUpAndRunningHandler', ("https://...", )),
                        ('HostIsUpAndRunningHandler', ("hostname", 80), {}),
                    )
                }
            })

        self.lab = LaboratoryServer.LaboratoryServer(None, locator,
                                                     cfg_manager)
Esempio n. 2
0
    def test_correct_single_instance(self):
        self.cfg_manager._set_value(
            LaboratoryServer.WEBLAB_LABORATORY_SERVER_ASSIGNED_EXPERIMENTS, {
                'exp_inst:exp_name@exp_cat': {
                    'coord_address':
                    'myserver:myinstance@mymachine',
                    'checkers': (
                        ('WebcamIsUpAndRunningHandler', ("https://...", )),
                        ('HostIsUpAndRunningHandler', ("hostname", 80), {}),
                    )
                }
            })

        self.lab = LaboratoryServer.LaboratoryServer(None, self.locator,
                                                     self.cfg_manager)
Esempio n. 3
0
 def _create_lab(self):
     self.lab = LaboratoryServer.LaboratoryServer(None, self.locator,
                                                  self.cfg_manager)