示例#1
0
 def test_error_wrong_platform(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config(
             get_temp_config_path(
                 tmpdir, 'azure-with-helper.yaml', update={'platform': 'aws'}))
     assert exinfo.value.error == 'ValidationError'
     assert 'platform must be calculated' in exinfo.value.msg
示例#2
0
 def test_error_with_nested_config(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config(
             get_temp_config_path(
                 tmpdir, 'aws-onprem-with-helper.yaml', update={'dcos_config': {'provider': 'aws'}}))
     assert exinfo.value.error == 'ValidationError'
     assert 'onprem_dcos_config_contents' in exinfo.value.msg
示例#3
0
 def test_error_wrong_platform(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config(
             get_temp_config_path(
                 tmpdir, 'azure-with-helper.yaml', update={'platform': 'aws'}))
     assert exinfo.value.error == 'ValidationError'
     assert 'platform must be calculated' in exinfo.value.msg
示例#4
0
 def test_error_is_skipped_in_nested_config(self, tmpdir):
     get_validated_config(
         get_temp_config_path(tmpdir,
                              'aws-onprem-with-helper.yaml',
                              update={'dcos_config': {
                                  'provider': 'aws'
                              }}))
示例#5
0
 def test_error_with_installer_url(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config(
             get_temp_config_path(
                 tmpdir, 'aws-cf-with-helper.yaml', update={'installer_url': 'foobar'}))
     assert exinfo.value.error == 'ValidationError'
     assert 'installer_url' in exinfo.value.msg
     assert 'Unrecognized/incompatible' in exinfo.value.msg
示例#6
0
 def test_error_with_installer_url(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config(
             get_temp_config_path(
                 tmpdir, 'aws-cf-with-helper.yaml', update={'installer_url': 'foobar'}))
     assert exinfo.value.error == 'ValidationError'
     assert 'installer_url' in exinfo.value.msg
     assert 'Unrecognized/incompatible' in exinfo.value.msg
示例#7
0
def bare_cluster_onprem_config_path(tmpdir, ssh_key_path):
    platform_info_path = tmpdir.join('bare_cluster_info.json')
    platform_info_path.write("""
{
    "ssh_user": "******"
}
""")
    return get_temp_config_path(tmpdir, 'bare-cluster-onprem.yaml', update={
        'ssh_private_key_filename': ssh_key_path,
        'platform_info_filename': str(platform_info_path)})
示例#8
0
def aws_bare_cluster_config_path(tmpdir, ssh_key_path):
    return get_temp_config_path(tmpdir, 'aws-bare-cluster.yaml', update={'ssh_private_key_filename': ssh_key_path})
示例#9
0
def aws_onprem_with_helper_config_path(tmpdir):
    return get_temp_config_path(tmpdir, 'aws-onprem-with-helper.yaml')
示例#10
0
def aws_onprem_config_path(tmpdir, ssh_key_path):
    return get_temp_config_path(tmpdir, 'aws-onprem.yaml', update={'ssh_private_key_filename': ssh_key_path})
示例#11
0
def azure_with_helper_config_path(tmpdir):
    return get_temp_config_path(tmpdir, 'azure-with-helper.yaml')
示例#12
0
def aws_onprem_config_path(tmpdir, ssh_key_path, mock_bare_cluster_hosts):
    return get_temp_config_path(tmpdir, 'aws-onprem.yaml', update={
        'ssh_private_key_filename': ssh_key_path})
示例#13
0
def aws_zen_cf_config_path(tmpdir, ssh_key_path, mocked_aws_zen_cf):
    return get_temp_config_path(tmpdir, 'aws-zen-cf.yaml')
示例#14
0
文件: conftest.py 项目: tamarrow/dcos
def aws_zen_cf_config_path(tmpdir, ssh_key_path, mocked_aws_zen_cf):
    return get_temp_config_path(tmpdir, 'aws-zen-cf.yaml')
示例#15
0
文件: conftest.py 项目: tamarrow/dcos
def aws_cf_with_helper_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-with-helper.yaml')
示例#16
0
 def test_error_is_skipped_in_nested_config(self, tmpdir):
     get_validated_config(
         get_temp_config_path(
             tmpdir, 'aws-onprem-with-helper.yaml',
             update={'dcos_config': {'provider': 'aws'}}))
示例#17
0
文件: conftest.py 项目: tamarrow/dcos
def aws_cf_no_pytest_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-no-pytest.yaml')
示例#18
0
def azure_config_path(tmpdir, mocked_azure, ssh_key_path):
    return get_temp_config_path(tmpdir, 'azure.yaml', update={'ssh_private_key_filename': ssh_key_path})
示例#19
0
def aws_onprem_with_helper_config_path(tmpdir, mock_bare_cluster_hosts):
    return get_temp_config_path(tmpdir, 'aws-onprem-with-helper.yaml')
示例#20
0
def aws_cf_config_path(tmpdir, ssh_key_path, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf.yaml', update={'ssh_private_key_filename': ssh_key_path})
示例#21
0
def aws_cf_no_pytest_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-no-pytest.yaml')
示例#22
0
def aws_cf_with_helper_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-with-helper.yaml')
示例#23
0
def azure_config_path(tmpdir):
    return get_temp_config_path(tmpdir, 'azure.yaml')
示例#24
0
文件: conftest.py 项目: tamarrow/dcos
def aws_cf_config_path(tmpdir, ssh_key_path, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf.yaml', update={'ssh_private_key_filename': ssh_key_path})
示例#25
0
文件: conftest.py 项目: tamarrow/dcos
def azure_with_helper_config_path(tmpdir, mocked_azure):
    return get_temp_config_path(tmpdir, 'azure-with-helper.yaml')