potiuk commented on code in PR #27526:
URL: https://github.com/apache/airflow/pull/27526#discussion_r1016523494
##########
kubernetes_tests/test_kubernetes_pod_operator.py:
##########
@@ -387,8 +369,53 @@ def test_pod_resources(self):
}
assert self.expected_pod == actual_pod
- def test_pod_affinity(self):
- affinity = {
+ @pytest.mark.parametrize(
+ "val",
+ [
+ param(
+ k8s.V1Affinity(
+ node_affinity=k8s.V1NodeAffinity(
+
required_during_scheduling_ignored_during_execution=k8s.V1NodeSelector(
+ node_selector_terms=[
+ k8s.V1NodeSelectorTerm(
+ match_expressions=[
+ k8s.V1NodeSelectorRequirement(
+ key="beta.kubernetes.io/os",
+ operator="In",
+ values=["linux"],
+ )
+ ]
+ )
+ ]
+ )
+ )
Review Comment:
Ugly it is. I agree. What are the benefits in deprecating the old way BTW :)
--
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]