예제 #1
0
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)
예제 #2
0
파일: main.py 프로젝트: sschneid/dcos-cli
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
예제 #3
0
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
예제 #4
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)