ashb commented on a change in pull request #4772: [AIRFLOW-3937]
KubernetesPodOperator support for envFrom configMapRef…
URL: https://github.com/apache/airflow/pull/4772#discussion_r266896929
##########
File path: tests/contrib/minikube/test_kubernetes_pod_operator.py
##########
@@ -326,6 +330,69 @@ def test_xcom_push(self):
)
self.assertEqual(k.execute(None), json.loads(return_value))
+ def test_envs_from_configmaps(self):
+ # GIVEN
+ return_value = 123
+ configmap_name = 'test-configmap'
+ metadata = V1ObjectMeta(
+ name=configmap_name,
+ namespace='default'
+ )
+ configmap_object = V1ConfigMap(
+ data={
+ "TEST_CONFIGMAP_VALUE": str(return_value)
+ },
+ metadata=metadata
+ )
+ client = get_kube_client(in_cluster=False)
+ client.create_namespaced_config_map(namespace='default',
body=configmap_object)
Review comment:
(My main concern with actually running the KubePodOperator here is that it
takes extra time compared to just mocking, and we don't need to check that kube
does what it says with valueFrom etc - kube has it's own test to check that)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services