You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2024/02/16 19:28:26 UTC

Re: [PR] Possibility to set labels specific to the migrateDatabaseJob objects and pods [airflow]

hussein-awala commented on code in PR #37490:
URL: https://github.com/apache/airflow/pull/37490#discussion_r1492903126


##########
helm_tests/airflow_aux/test_migrate_database_job.py:
##########
@@ -60,6 +60,18 @@ def test_should_support_annotations(self):
         assert "fiz" in job_annotations
         assert "fuz" == job_annotations["fiz"]
 
+    def test_should_add_component_specific_labels(self):
+        docs = render_chart(
+            values={
+                "migrateDatabaseJob": {
+                    "labels": {"test_label": "test_label_value"},
+                },
+            },
+            show_only=["templates/jobs/migrate-database-job.yaml"],
+        )
+        assert "test_label" in jmespath.search("spec.template.metadata.labels", docs[0])
+        assert jmespath.search("spec.template.metadata.labels", docs[0])["test_label"] == "test_label_value"

Review Comment:
   could you add a second test to check if the labels and migrateDatabaseJob labels are merged correctly?



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org