Esempio n. 1
0
def test_validate_config_with_template_url():
    config = Config({
        'Environment': 'dev',
        'Region': 'us-east-1',
        'StackName': 'Name',
        'Template': 'https://s3.amazonaws.com/notarealurl'
    })
    config.validate(check_template=True)
Esempio n. 2
0
def test_validate_config_missing_template():
    config = Config({
        'Environment': 'dev',
        'Region': 'us-east-1',
        'StackName': 'Name'
    })
    with pytest.raises(ValidationError, match='Template not set'):
        config.validate(check_template=True)
Esempio n. 3
0
def test_validate_config_with_template_file():
    config = Config({
        'Environment': 'dev',
        'Region': 'us-east-1',
        'StackName': 'Name',
        # Uses this file as the template file as it's just an exists check
        'Template': __file__
    })
    config.validate(check_template=True)