Ejemplo n.º 1
0
 def test_no_local_region(self, tmpdir):
     """ Tests that if no 'local' option is handed to the fault domain helper,
     an error will be raised
     """
     config = get_validated_config_from_path(
         get_temp_config_path(
             tmpdir, 'gcp-onprem-with-fd-helper.yaml'))
     del config['fault_domain_helper']['USA']['local']
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config_from_path(
             get_temp_config_path(
                 tmpdir, 'gcp-onprem-with-fd-helper.yaml',
                 update={'fault_domain_helper': config['fault_domain_helper']}))
     assert exinfo.value.error == 'ValidationError'
Ejemplo n.º 2
0
 def test_error_with_invalid_field(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config_from_path(
             get_temp_config_path(
                 tmpdir, 'azure-with-helper.yaml', update={'num_masters': '0.0.0'}))
     assert exinfo.value.error == 'ValidationError'
     assert 'num_masters' in exinfo.value.msg
Ejemplo n.º 3
0
 def test_error_with_invalid_field(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config_from_path(
             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
Ejemplo n.º 4
0
 def test_error_is_skipped_in_nested_config(self, tmpdir):
     get_validated_config_from_path(
         get_temp_config_path(tmpdir,
                              'aws-onprem-with-helper.yaml',
                              update={'dcos_config': {
                                  'provider': 'aws'
                              }}))
Ejemplo n.º 5
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': {
                                          'ip_detect_content': 'foo',
                                          'ip_detect_filename': 'bar'
                                      }
                                  }))
     assert exinfo.value.error == 'ValidationError'
     assert 'ip_detect' in exinfo.value.msg
Ejemplo n.º 6
0
def aws_onprem_with_extra_iam_config_path(tmpdir,
                                          mocked_aws_cfstack_bare_cluster):
    return get_temp_config_path(tmpdir, 'aws-onprem-with-extra-iam.yaml')
Ejemplo n.º 7
0
def aws_onprem_with_helper_config_path(tmpdir,
                                       mocked_aws_cfstack_bare_cluster):
    return get_temp_config_path(tmpdir, 'aws-onprem-with-helper.yaml')
Ejemplo n.º 8
0
def aws_onprem_install_prereqs_config_path(tmpdir,
                                           mocked_aws_cfstack_bare_cluster):
    return get_temp_config_path(tmpdir, 'aws-onprem-install-prereqs.yaml')
Ejemplo n.º 9
0
def aws_onprem_config_path(tmpdir, ssh_key_path,
                           mocked_aws_cfstack_bare_cluster):
    return get_temp_config_path(
        tmpdir,
        'aws-onprem.yaml',
        update={'ssh_private_key_filename': ssh_key_path})
Ejemplo n.º 10
0
def azure_with_helper_config_path(tmpdir, mocked_azure):
    return get_temp_config_path(tmpdir, 'azure-with-helper.yaml')
Ejemplo n.º 11
0
def gce_onprem_with_helper_config_path(tmpdir, mock_bare_cluster_hosts,
                                       mocked_gce):
    return get_temp_config_path(tmpdir, 'gce-onprem-with-helper.yaml')
Ejemplo n.º 12
0
def gcp_onprem_with_fd_helper_config_path(tmpdir, mocked_gcp):
    return get_temp_config_path(tmpdir, 'gcp-onprem-with-fd-helper.yaml')
Ejemplo n.º 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')
Ejemplo n.º 14
0
def aws_cf_with_helper_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-with-helper.yaml')
Ejemplo n.º 15
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})
Ejemplo n.º 16
0
def aws_onprem_with_genconf_config_path(tmpdir, mock_genconf_dir,
                                        mocked_aws_cfstack_bare_cluster):
    return get_temp_config_path(tmpdir,
                                'aws-onprem-with-genconf.yaml',
                                update={'genconf_dir': mock_genconf_dir})
Ejemplo n.º 17
0
def gcp_onprem_config_path(tmpdir, ssh_key_path, mocked_gcp):
    return get_temp_config_path(
        tmpdir,
        'gcp-onprem.yaml',
        update={'ssh_private_key_filename': ssh_key_path})
Ejemplo n.º 18
0
def aws_cf_no_pytest_config_path(tmpdir, mocked_aws_cf):
    return get_temp_config_path(tmpdir, 'aws-cf-no-pytest.yaml')
Ejemplo n.º 19
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})
Ejemplo n.º 20
0
def gce_onprem_config_path(tmpdir, ssh_key_path, mock_bare_cluster_hosts,
                           mocked_gce):
    return get_temp_config_path(
        tmpdir,
        'gce-onprem.yaml',
        update={'ssh_private_key_filename': ssh_key_path})