jason810496 commented on code in PR #59873:
URL: https://github.com/apache/airflow/pull/59873#discussion_r2657700430
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_connections.py:
##########
@@ -37,6 +45,41 @@ def test_hook_meta_data(self, test_client):
if hook_data["connection_type"] == "fs":
assert hook_data["hook_name"] == "File (path)"
+ @pytest.mark.parametrize(
+ ("extra_fields", "expected_response"),
+ [
+ ({"secret_key": "test-secret_key"}, {"secret_key": "***"}),
+ ({"extra_fields": "test-extra_fields"}, {"extra_fields":
"test-extra_fields"}),
Review Comment:
Even though redact was added for `extra_fields`, it isn’t works here. Since
the `expected_response` is `{"extra_fields": "test-extra_fields"}` instead of
`{"extra_fields": "***"}`.
We should adjust the implementation so redact masks `extra_fields`, making
the `expected_response` as `{"extra_fields": "***"}` and letting the test pass.
Thanks!
--
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]