Exemple #1
0
    def test_update_config(self, mock_non_envs):
        config_dict = {'key': {'path': ['aa / bb/ cc'], 'value': 'val'}}
        dovetail_cfg = DovetailConfig()

        dovetail_cfg.update_config(config_dict)

        mock_non_envs.assert_called_once_with(['aa', 'bb', 'cc'], 'val')
Exemple #2
0
def parse_cli(logger=None, **kwargs):
    configs = filter_config(kwargs, logger)
    if configs is not None:
        dt_cfg.update_config(configs)
    dt_cfg.dovetail_config['offline'] = kwargs['offline']
    dt_cfg.dovetail_config['noclean'] = kwargs['no_clean']
    dt_cfg.dovetail_config['stop'] = kwargs['stop']
    dt_cfg.dovetail_config['mandatory'] = kwargs['mandatory']
    dt_cfg.dovetail_config['optional'] = kwargs['optional']
    if kwargs['no_api_validation']:
        dt_cfg.dovetail_config['no_api_validation'] = True
        logger.warning('Strict API response validation DISABLED.')
    else:
        dt_cfg.dovetail_config['no_api_validation'] = False