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


##########
shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py:
##########
@@ -243,10 +253,15 @@ def test_masking_in_explicit_context_exceptions(self, 
logger, caplog):
         ],
     )
     def test_mask_secret(self, name, value, expected_mask):
-        filt = SecretsMasker()
-        filt.add_mask(value, name)
+        from airflow_shared.secrets_masker.secrets_masker import 
_secrets_masker
+        filt = _secrets_masker()
+        configure_secrets_masker_for_test(filt)
 
-        assert filt.patterns == expected_mask
+        try:
+            filt.add_mask(value, name)
+            assert filt.patterns == expected_mask
+        finally:
+            reset_secrets_masker()

Review Comment:
   @potiuk the global singleton was added so that the symlink doesn't cause a 
lot of chaos and if it does, is much more manageable because we can know that 
it is a module level global object
   
   Earlier it was looking in the logging filters etc etc. 



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

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

Reply via email to