Skip to content
Prev Previous commit
Next Next commit
Misc
  • Loading branch information
Miretpl committed Jan 12, 2026
commit c0b9773e271e0fa265e14bc668e36f78e01f103d
130 changes: 65 additions & 65 deletions helm-tests/tests/helm_tests/security/test_security_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,14 @@ def test_check_local_setting_airflow_2(self):
"uid": 3000,
"gid": 30,
"securityContext": {"runAsUser": 6000, "fsGroup": 60},
"webserver": {**component_contexts},
"workers": {**component_contexts},
"webserver": component_contexts,
"workers": component_contexts,
"flower": {"enabled": True, **component_contexts},
"scheduler": {**component_contexts},
"createUserJob": {**component_contexts},
"migrateDatabaseJob": {**component_contexts},
"triggerer": {**component_contexts},
"redis": {**component_contexts},
"scheduler": component_contexts,
"createUserJob": component_contexts,
"migrateDatabaseJob": component_contexts,
"triggerer": component_contexts,
"redis": component_contexts,
"statsd": {"enabled": True, **component_contexts},
"airflowVersion": "2.11.0",
"executor": "CeleryKubernetesExecutor",
Expand Down Expand Up @@ -381,7 +381,7 @@ def test_check_local_uid(self):
component_contexts = {"uid": 3000, "securityContext": {"runAsUser": 7000}}
docs = render_chart(
values={
"redis": {**component_contexts},
"redis": component_contexts,
"statsd": {"enabled": True, **component_contexts},
},
show_only=[
Expand Down Expand Up @@ -467,16 +467,16 @@ def test_main_container_setting_airflow_2(self, workers_values):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"webserver": {**security_context},
"scheduler": security_context,
"webserver": security_context,
"workers": workers_values,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"pgbouncer": {"enabled": True, **security_context},
"redis": {**security_context},
"redis": security_context,
"airflowVersion": "2.11.0",
},
show_only=[
Expand Down Expand Up @@ -516,17 +516,17 @@ def test_main_container_setting(self, workers_values):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"dagProcessor": {**security_context},
"apiServer": {**security_context},
"scheduler": security_context,
"dagProcessor": security_context,
"apiServer": security_context,
"workers": workers_values,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"pgbouncer": {"enabled": True, **security_context},
"redis": {**security_context},
"redis": security_context,
},
show_only=[
"templates/cleanup/cleanup-cronjob.yaml",
Expand Down Expand Up @@ -557,10 +557,10 @@ def test_log_groomer_sidecar_container_setting(self):
spec = {"logGroomerSidecar": {"securityContexts": {"container": ctx_value}}}
docs = render_chart(
values={
"scheduler": {**spec},
"workers": {**spec},
"dagProcessor": {**spec},
"triggerer": {**spec},
"scheduler": spec,
"workers": spec,
"dagProcessor": spec,
"triggerer": spec,
},
show_only=[
"templates/scheduler/scheduler-deployment.yaml",
Expand Down Expand Up @@ -613,9 +613,9 @@ def test_wait_for_migrations_init_container_setting_airflow_2(self):
}
docs = render_chart(
values={
"scheduler": {**spec},
"webserver": {**spec},
"triggerer": {**spec},
"scheduler": spec,
"webserver": spec,
"triggerer": spec,
"workers": {"waitForMigrations": {"securityContexts": {"container": ctx_value}}},
"airflowVersion": "2.11.0",
},
Expand All @@ -640,10 +640,10 @@ def test_wait_for_migrations_init_container_setting(self):
}
docs = render_chart(
values={
"scheduler": {**spec},
"apiServer": {**spec},
"triggerer": {**spec},
"dagProcessor": {**spec},
"scheduler": spec,
"apiServer": spec,
"triggerer": spec,
"dagProcessor": spec,
"workers": {"waitForMigrations": {"securityContexts": {"container": ctx_value}}},
},
show_only=[
Expand Down Expand Up @@ -712,16 +712,16 @@ def test_main_pod_setting_airflow_2(self, workers_values):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"webserver": {**security_context},
"scheduler": security_context,
"webserver": security_context,
"workers": workers_values,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"pgbouncer": {"enabled": True, **security_context},
"redis": {**security_context},
"redis": security_context,
"airflowVersion": "2.11.0",
},
show_only=[
Expand Down Expand Up @@ -758,17 +758,17 @@ def test_main_pod_setting(self, workers_values):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"apiServer": {**security_context},
"scheduler": security_context,
"apiServer": security_context,
"workers": workers_values,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"pgbouncer": {"enabled": True, **security_context},
"redis": {**security_context},
"dagProcessor": {**security_context},
"redis": security_context,
"dagProcessor": security_context,
},
show_only=[
"templates/cleanup/cleanup-cronjob.yaml",
Expand Down Expand Up @@ -799,15 +799,15 @@ def test_main_pod_setting_legacy_security_airflow_2(self):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"webserver": {**security_context},
"workers": {**security_context},
"scheduler": security_context,
"webserver": security_context,
"workers": security_context,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"redis": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"redis": security_context,
"airflowVersion": "2.11.0",
},
show_only=[
Expand Down Expand Up @@ -836,15 +836,15 @@ def test_main_pod_setting_legacy_security(self):
values={
"executor": "CeleryExecutor,KubernetesExecutor",
"cleanup": {"enabled": True, **security_context},
"scheduler": {**security_context},
"workers": {**security_context},
"scheduler": security_context,
"workers": security_context,
"flower": {"enabled": True, **security_context},
"statsd": {**security_context},
"createUserJob": {**security_context},
"migrateDatabaseJob": {**security_context},
"triggerer": {**security_context},
"redis": {**security_context},
"dagProcessor": {**security_context},
"statsd": security_context,
"createUserJob": security_context,
"migrateDatabaseJob": security_context,
"triggerer": security_context,
"redis": security_context,
"dagProcessor": security_context,
},
show_only=[
"templates/cleanup/cleanup-cronjob.yaml",
Expand Down