Пример #1
0
def run_schema_error_test(stack):
    """
    Generate a playbook from a stack conf, that is expected to raise an
    Exception
    """
    with pytest.raises(SchemaError):
        with open(CONFIG, 'r') as configuration:
            config = LauncherConf(configuration)
            yaml.load(playbook_generate(StackConf(stack), config))
def run_schema_error_test(stack):
    """
    Generate a playbook from a stack conf, that is expected to raise an
    Exception
    """
    with pytest.raises(SchemaError):
        with open(CONFIG, 'r') as configuration:
            config = LauncherConf(configuration)
            yaml.load(playbook_generate(StackConf(stack), config))
def test_scheduler_schema():
    stack = {
        'services': [{
            'name': 'test_service',
            'repo': 'test/repo',
            'schedule': [{
                'onboot': '2min',
                'schedule': '5min',
                'description': 'something'
            }]
        }]
    }
    with open(CONFIG, 'r') as configuration:
        config = LauncherConf(configuration)
        yaml.load(playbook_generate(StackConf(stack), config))
Пример #4
0
def test_scheduler_schema():
    stack = {
        'services': [{
            'name':
            'test_service',
            'repo':
            'test/repo',
            'schedule': [{
                'onboot': '2min',
                'schedule': '5min',
                'description': 'something'
            }]
        }]
    }
    with open(CONFIG, 'r') as configuration:
        config = LauncherConf(configuration)
        yaml.load(playbook_generate(StackConf(stack), config))