jedcunningham commented on a change in pull request #17537: URL: https://github.com/apache/airflow/pull/17537#discussion_r688107979
########## File path: tests/kubernetes/test_pod_generator.py ########## @@ -631,6 +631,15 @@ def test_reconcile_specs(self): client_spec.active_deadline_seconds = 100 assert client_spec == res + def test_reconcile_specs_init_containers(self): + base_objs = [k8s.V1Container(name='base_container1')] + client_objs = [k8s.V1Container(name='client_container1')] + base_spec = k8s.V1PodSpec(priority=1, containers=[], init_containers=base_objs) + client_spec = k8s.V1PodSpec(priority=2, containers=[], init_containers=client_objs) Review comment: ```suggestion base_spec = k8s.V1PodSpec(containers=[], init_containers=[k8s.V1Container(name='base_container1')]) client_spec = k8s.V1PodSpec(containers=[], init_containers=[k8s.V1Container(name='client_container1')]) ``` Do we need `priority`? Does this work instead? ########## File path: tests/kubernetes/test_pod_generator.py ########## @@ -631,6 +631,15 @@ def test_reconcile_specs(self): client_spec.active_deadline_seconds = 100 assert client_spec == res + def test_reconcile_specs_init_containers(self): + base_objs = [k8s.V1Container(name='base_container1')] + client_objs = [k8s.V1Container(name='client_container1')] + base_spec = k8s.V1PodSpec(priority=1, containers=[], init_containers=base_objs) + client_spec = k8s.V1PodSpec(priority=2, containers=[], init_containers=client_objs) + res = PodGenerator.reconcile_specs(base_spec, client_spec) + client_spec.init_containers = base_spec.init_containers + client_spec.init_containers + assert client_spec == res Review comment: ```suggestion assert res.init_containers == base_spec.init_containers + client_spec.init_containers ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org