potiuk commented on code in PR #25530:
URL: https://github.com/apache/airflow/pull/25530#discussion_r939641159
##########
kubernetes_tests/test_kubernetes_pod_operator.py:
##########
@@ -472,10 +472,28 @@ def test_volume_mount(self):
assert self.expected_pod == actual_pod
def test_run_as_user_root(self):
+ security_context = {'runAsUser': 0}
+ k = KubernetesPodOperator(
+ namespace='default',
+ image="ubuntu:16.04",
+ cmds=["bash", "-cx"],
+ arguments=["echo 10"],
+ labels={"foo": "bar"},
+ name="test-" + str(random.randint(0, 1000000)),
+ task_id="task" + self.get_current_task_name(),
+ in_cluster=False,
+ do_xcom_push=False,
+ security_context=security_context,
+ )
+ context = create_context(k)
+ k.execute(context)
+ actual_pod = self.api_client.sanitize_for_serialization(k.pod)
+ self.expected_pod['spec']['securityContext'] = security_context
+ assert self.expected_pod == actual_pod
+
+ def test_run_as_user_non_root(self):
security_context = {
- 'securityContext': {
- 'runAsUser': 0,
- }
+ 'runAsUser': 1000,
Review Comment:
And this looks like a breaking change. Why do we change it ?
--
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]