Skip to content

Commit

Permalink
Adding versioned unit tests for kerberos init container (#36364)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh authored Dec 30, 2023
1 parent 13e4905 commit 09603ff
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions helm_tests/airflow_core/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,21 +564,28 @@ def test_airflow_local_settings_kerberos_sidecar(self):
} in jmespath.search("spec.template.spec.containers[2].volumeMounts", docs[0])

@pytest.mark.parametrize(
"airflow_version, expected_init_containers",
"airflow_version, init_container_enabled, expected_init_containers",
[
("1.9.0", 2),
("1.10.14", 2),
("2.0.2", 2),
("2.1.0", 2),
("2.8.0", 3),
("1.9.0", True, 2),
("1.9.0", False, 2),
("1.10.14", True, 2),
("1.10.14", False, 2),
("2.0.2", True, 2),
("2.0.2", False, 2),
("2.1.0", True, 2),
("2.1.0", False, 2),
("2.8.0", True, 3),
("2.8.0", False, 2),
],
)
def test_airflow_kerberos_init_container(self, airflow_version, expected_init_containers):
def test_airflow_kerberos_init_container(
self, airflow_version, init_container_enabled, expected_init_containers
):
docs = render_chart(
values={
"airflowVersion": airflow_version,
"workers": {
"kerberosInitContainer": {"enabled": True},
"kerberosInitContainer": {"enabled": init_container_enabled},
"persistence": {"fixPermissions": True},
},
},
Expand Down

0 comments on commit 09603ff

Please sign in to comment.