def test_validate(env): os.environ['DCOS_CONFIG'] = env['DCOS_CONFIG'] stdout = 'Validating %s ...\n' % config.get_config_path() + \ 'Congratulations, your configuration is valid!\n' stdout = stdout.encode('utf-8') assert_command(['dcos', 'config', 'validate'], env=env, stdout=stdout)
def _validate(): """ :returns: process status :rtype: int """ toml_config = config.get_config(True) emitter.publish('Validating %s ...' % config.get_config_path()) errs = util.validate_json(toml_config._dictionary, config.generate_root_schema(toml_config)) if len(errs) != 0: emitter.publish(util.list_to_err(errs)) return 1 emitter.publish("Congratulations, your configuration is valid!") return 0
def test_validate(env): stdout = 'Validating %s ...\n' % config.get_config_path() + \ 'Congratulations, your configuration is valid!\n' stdout = stdout.encode('utf-8') assert_command(['dcos', 'config', 'validate'], env=env, stdout=stdout)