Example #1
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'
                              }}))
Example #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
Example #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
Example #4
0
 def test_error_with_nested_config(self, tmpdir):
     with pytest.raises(LauncherError) as exinfo:
         get_validated_config_from_path(
             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
Example #5
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'
Example #6
0
 def test_with_fd_helper(self, gcp_onprem_with_fd_helper_config_path):
     config = get_validated_config_from_path(
         gcp_onprem_with_fd_helper_config_path)
     assert config['num_private_agents'] == 9
     assert config['num_public_agents'] == 5
     assert set(
         config['fault_domain_helper'].keys()) == {'Europe', 'USA', 'Asia'}
Example #7
0
 def test_with_genconf(self, aws_onprem_with_genconf_config_path):
     get_validated_config_from_path(aws_onprem_with_genconf_config_path)
Example #8
0
 def test_with_key_helper(self, aws_onprem_with_helper_config_path):
     get_validated_config_from_path(aws_onprem_with_helper_config_path)
Example #9
0
 def test_basic(self, aws_onprem_config_path):
     get_validated_config_from_path(aws_onprem_config_path)
Example #10
0
 def test_with_key_helper(self, azure_with_helper_config_path):
     get_validated_config_from_path(azure_with_helper_config_path)
Example #11
0
 def test_basic(self, azure_config_path):
     get_validated_config_from_path(azure_config_path)
Example #12
0
 def test_without_pytest_support(self, aws_cf_no_pytest_config_path):
     get_validated_config_from_path(aws_cf_no_pytest_config_path)
Example #13
0
 def test_with_zen_helper(self, aws_zen_cf_config_path):
     get_validated_config_from_path(aws_zen_cf_config_path)
Example #14
0
 def test_with_with_extra_volumes(
         self, aws_onprem_with_extra_volumes_config_path):
     get_validated_config_from_path(
         aws_onprem_with_extra_volumes_config_path)
Example #15
0
 def test_with_extra_iam(self, aws_onprem_with_extra_iam_config_path):
     get_validated_config_from_path(aws_onprem_with_extra_iam_config_path)
Example #16
0
 def test_enterprise(self, aws_onprem_enterprise_config_path):
     get_validated_config_from_path(aws_onprem_enterprise_config_path)