Exemplo n.º 1
0
 def test_stage_not_configured(self):
     from genie.libs.clean.clean import CleanTestcase
     tb = load(test_path + '/mock_testbed.yaml')
     k = KleenexFileLoader(testbed=tb,
                           invoke_clean=True).\
                           load(test_path+'/mock_clean_invalid.yaml')
     KleenexEngine.update_testbed(tb, **k['devices'])
     device = tb.devices['PE1']
     tc = CleanTestcase(device, global_stage_reuse_limit=1)
     with self.assertRaisesRegex(AEtestFailedSignal,
                                 'has no configuration in clean.yaml'):
         tc()
Exemplo n.º 2
0
    def setUp(self):
        # Load sample testbed YAML & clean YAML
        self.tb = load(test_path + '/mock_testbed.yaml')
        self.clean_config = KleenexFileLoader(testbed=self.tb,
                                              invoke_clean=True).\
                                              load(test_path+'/mock_clean.yaml')
        KleenexEngine.update_testbed(self.tb, **self.clean_config['devices'])

        self.steps = Steps()
        self.device = self.tb.devices['N95']
        self.device.is_ha = None
        self.raw_output = PassedStageOutputs
        self.section = TestItem(uid='test', description='', parameters={})