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_r266897360
 
 

 ##########
 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:
   Example  where we are mocking  already in tests 
https://github.com/apache/airflow/blob/34ad533cac3a13d370de9ddced72312268e33511/tests/contrib/minikube/test_kubernetes_pod_operator.py#L67-L89

----------------------------------------------------------------
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

Reply via email to