amoghrajesh commented on code in PR #57970:
URL: https://github.com/apache/airflow/pull/57970#discussion_r2517184280


##########
airflow-core/tests/unit/core/test_configuration.py:
##########
@@ -1088,6 +1088,39 @@ def test_order_of_secrets_backends_and_kwargs_on_workers(
             for key, value in expected_backend_kwargs.items():
                 assert getattr(secrets_backend, key) == value
 
+    def test_lookup_sequence_order(self):
+        """Test that lookup sequence follows correct priority order."""
+        test_conf = AirflowConfigParser()
+        sequence = test_conf._lookup_sequence
+
+        assert sequence == [
+            test_conf._get_environment_variables,
+            test_conf._get_option_from_config_file,
+            test_conf._get_option_from_commands,
+            test_conf._get_option_from_secrets,
+            test_conf._get_option_from_defaults,
+            test_conf._get_option_from_provider_fallbacks,
+        ]
+
+    def test_lookup_sequence_override(self):
+        """Test that subclasses can override lookup sequence."""
+
+        class MyAirflowConfigPrser(AirflowConfigParser):
+            @property
+            def _lookup_sequence(self) -> list[callable]:
+                return [
+                    self._get_option_from_secrets,
+                    self._get_option_from_config_file,
+                ]
+
+        test_conf = MyAirflowConfigPrser()
+        myorder = test_conf._lookup_sequence
+        assert len(myorder) == 2
+        assert myorder == [
+            test_conf._get_option_from_secrets,
+            test_conf._get_option_from_config_file,
+        ]
+

Review Comment:
   Yeah, it kind of is an overkill. Removing 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]

Reply via email to