def test_provisioner(_config):
    assert {} == schema_v2.validate(_config)
Exemple #2
0
def test_driver_provider_name_nullable(_config):
    assert {} == schema_v2.validate(_config)
def test_platforms_driver_name_required(_config):
    del _config['platforms'][0]['name']
    x = {'platforms': [{0: [{'name': ['required field']}]}]}

    assert x == schema_v2.validate(_config)
def test_dependency_invalid_dependency_name_has_errors(_config):
    x = {'dependency': [{'name': ['unallowed value ']}]}

    assert x == schema_v2.validate(_config)
def test_platforms_docker(_config):
    assert {} == schema_v2.validate(_config)
def test_platforms_docker_has_errors(_config):
    x = {
        'platforms': [{
            0: [{
                'name': ['must be of string type'],
                'hostname': ['must be of string type'],
                'image': ['must be of string type'],
                'pull': ['must be of boolean type'],
                'dockerfile': ['must be of string type'],
                'pre_build_image': ['must be of boolean type'],
                'registry': [{
                    'url': ['must be of string type'],
                    'credentials': [{
                        'username': ['must be of string type'],
                        'password': ['must be of string type'],
                        'email': ['must be of string type'],
                    }],
                }],
                'override_command': ['must be of boolean type'],
                'command': ['must be of string type'],
                'tty': ['must be of boolean type'],
                'pid_mode': ['must be of string type'],
                'privileged': ['must be of boolean type'],
                'security_opts': [{
                    0: ['must be of string type']
                }],
                'volumes': [{
                    0: ['must be of string type']
                }],
                'keep_volumes': ['must be of boolean type'],
                'tmpfs': [{
                    0: ['must be of string type']
                }],
                'capabilities': [{
                    0: ['must be of string type']
                }],
                'sysctls': ['must be of dict type'],
                'exposed_ports': [{
                    0: ['must be of string type']
                }],
                'published_ports': [{
                    0: ['must be of string type']
                }],
                'ulimits': [{
                    0: ['must be of string type']
                }],
                'dns_servers': [{
                    0: ['must be of string type']
                }],
                'etc_hosts': ['must be of [\'string\', \'dict\'] type'],
                'env': ['must be of dict type'],
                'restart_policy': ['must be of string type'],
                'restart_retries': ['must be of integer type'],
                'networks': [{
                    0: [{
                        'name': ['must be of string type']
                    }]
                }],
                'network_mode': ['must be of string type'],
                'purge_networks': ['must be of boolean type'],
                'docker_host': ['must be of string type'],
                'cacert_path': ['must be of string type'],
                'cert_path': ['must be of string type'],
                'key_path': ['must be of string type'],
                'tls_verify': ['must be of boolean type'],
            }]
        }]
    }

    assert x == schema_v2.validate(_config)
def test_verifier(_config):
    assert {} == schema_v2.validate(_config)
Exemple #8
0
def test_driver_invalid_driver_name_has_errors(_config):
    x = {'driver': [{'name': ['unallowed value ']}]}

    assert x == schema_v2.validate(_config)
Exemple #9
0
def test_lint_allows_name(_config):
    assert {} == schema_v2.validate(_config)
Exemple #10
0
def test_verifier_errors_readonly_options_section_data(_config):
    x = {'verifier': [{'options': [{'foo': ['field is read-only']}]}]}

    assert x == schema_v2.validate(_config)
Exemple #11
0
def test_lint(_config):
    assert {} == schema_v2.validate(_config)
def test_dependency(_config):
    assert {} == schema_v2.validate(_config)
def test_dependency_shell_has_errors(_config):
    x = {'dependency': [{'command': ['null value not allowed']}]}

    assert x == schema_v2.validate(_config)
Exemple #14
0
def test_driver_provider_name_not_nullable_when_vagrant_driver(_config):
    x = {'driver': [{'provider': [{'name': ['null value not allowed']}]}]}

    assert x == schema_v2.validate(_config)
Exemple #15
0
def test_platforms_linode(_config):
    assert {} == schema_v2.validate(_config)
Exemple #16
0
def test_driver_allows_name(_config):
    assert {} == schema_v2.validate(_config)
def test_scenario(_config):
    assert {} == schema_v2.validate(_config)
Exemple #18
0
def test_driver(_config):
    assert {} == schema_v2.validate(_config)
Exemple #19
0
def test_base_config(_config):
    assert {} == schema_v2.validate(_config)
def test_platforms_docker_exposed_ports_coerced(_config):
    _config['platforms'][0]['exposed_ports'] = [9904]
    assert {} == schema_v2.validate(_config)
def test_provisioner_playbooks_side_effect_nullable(_config):
    assert {} == schema_v2.validate(_config)
def test_platforms_vagrant(_config):
    assert {} == schema_v2.validate(_config)
def test_provisioner_allows_name(_config):
    assert {} == schema_v2.validate(_config)
def test_platforms_hetznercloud(_config):
    assert {} == schema_v2.validate(_config)
def test_dependency_allows_shell_name(_config):
    assert {} == schema_v2.validate(_config)