예제 #1
0
 def test_kube_config_worker_annotations_properly_parsed(self):
     annotations = KubeConfig().kube_annotations
     self.assertEqual({'iam.com/role': 'role-arn', 'other/annotation': 'value'}, annotations)
예제 #2
0
 def test_kube_config_no_worker_annotations(self):
     annotations = KubeConfig().kube_annotations
     self.assertIsNone(annotations)
예제 #3
0
 def test_delete_option_kwargs_config(self, config, expected_value):
     with conf_vars({
         ('kubernetes', 'delete_option_kwargs'): config,
     }):
         self.assertEqual(KubeConfig().delete_option_kwargs, expected_value)
예제 #4
0
 def test_worker_configuration_auth_both_ssh_and_user(self):
     with self.assertRaisesRegex(AirflowConfigException,
                                 'either `git_user` and `git_password`.*'
                                 'or `git_ssh_key_secret_name`.*'
                                 'but not both$'):
         KubeConfig()