jason810496 commented on code in PR #60392:
URL: https://github.com/apache/airflow/pull/60392#discussion_r2682387351
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_connections.py:
##########
@@ -58,6 +58,48 @@ def test_hook_meta_data(self, test_client):
},
{"secret_key": "***", "extra_fields": "test-extra_fields",
"password": "***"},
),
+ (
+ {
+ "auth_type": {
+ "value": "oauth2",
+ "schema": {
+ "type": ["string", "null"],
+ "title": "Auth Type",
+ },
+ "description": "Authentication type: 'basic' (default)
| 'oauth2'",
+ "source": None,
+ },
+ "access_token": { # sensitive field
+ "value": "oauth2-bearer-token",
+ "schema": {
+ "type": ["string", "null"], # Optional field
+ "title": "Access Token",
+ },
+ "description": "OAuth 2 bearer (one-hour).",
+ "source": None,
+ },
+ },
+ {
+ "auth_type": {
+ "value": "oauth2",
+ "schema": {
+ "type": ["string", "null"],
+ "title": "Auth Type",
+ },
+ "description": "Authentication type: 'basic' (default)
| 'oauth2'",
+ "source": None,
+ },
+ "access_token": { # sensitive field - masked but
schema.type preserved
+ "value": "***",
+ "schema": {
+ "type": ["string", "null"], # Should be preserved
+ "title": "***",
+ },
+ "description": "***",
Review Comment:
Based on the expected result of test cases, do we need to preserve the
"schema .title" and "description" as well?
--
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]