uranusjr commented on code in PR #27457:
URL: https://github.com/apache/airflow/pull/27457#discussion_r1015981804
##########
tests/providers/cncf/kubernetes/operators/test_kubernetes_pod.py:
##########
@@ -97,6 +97,53 @@ def setup(self, dag_maker):
patch.stopall()
+ def test_template_fields(self):
+ assert 9 == KubernetesPodOperator.template_fields.__len__()
+ KubernetesPodOperator.template_fields.__contains__('image')
+ KubernetesPodOperator.template_fields.__contains__('cmds')
+ KubernetesPodOperator.template_fields.__contains__('arguments')
+ KubernetesPodOperator.template_fields.__contains__('env_vars')
+ KubernetesPodOperator.template_fields.__contains__('labels')
+ KubernetesPodOperator.template_fields.__contains__('config_file')
+ KubernetesPodOperator.template_fields.__contains__('pod_template_file')
+ KubernetesPodOperator.template_fields.__contains__('namespace')
+
KubernetesPodOperator.template_fields.__contains__('container_resources')
Review Comment:
These don’t do anything. Do you mean `assert "image" in
KubernetesPodOperator.template_fields`?
Although honestly checking for this is pretty useless IMO and can be removed
entirely.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]