Miretpl commented on code in PR #65030:
URL: https://github.com/apache/airflow/pull/65030#discussion_r3066907503
##########
helm-tests/tests/helm_tests/airflow_core/test_worker.py:
##########
@@ -2316,20 +2354,37 @@ def test_should_be_disabled_on_keda_enabled(self,
workers_values):
assert len(docs) == 1
- def test_should_add_component_specific_labels(self):
+ @pytest.mark.parametrize(
+ "workers_values",
+ [
+ {"celery": {"hpa": {"enabled": True}}, "labels": {"test_label":
"test_label_value"}},
+ {
+ "celery": {
+ "hpa": {"enabled": True},
+ "labels": {"test_label": "test_label_value"},
+ }
+ },
+ {
+ "labels": {"label": "value"},
+ "celery": {
+ "hpa": {"enabled": True},
+ "labels": {"test_label": "test_label_value"},
+ },
+ },
+ ],
+ )
+ def test_should_add_component_specific_labels(self, workers_values):
docs = render_chart(
values={
"executor": "CeleryExecutor",
- "workers": {
- "celery": {"hpa": {"enabled": True}},
- "labels": {"test_label": "test_label_value"},
- },
+ "workers": workers_values,
},
show_only=["templates/workers/worker-hpa.yaml"],
)
- assert "test_label" in jmespath.search("metadata.labels", docs[0])
- assert jmespath.search("metadata.labels", docs[0])["test_label"] ==
"test_label_value"
+ labels = jmespath.search("metadata.labels", docs[0])
+ assert labels["test_label"] == "test_label_value"
+ assert labels.get("labels") is None
Review Comment:
True, and I know that these places exist. Will be fixed before marking the
PR ready to review.
--
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]