vincbeck commented on code in PR #49804:
URL: https://github.com/apache/airflow/pull/49804#discussion_r2067049730


##########
providers/amazon/tests/system/amazon/aws/example_google_api_youtube_to_s3.py:
##########
@@ -73,28 +72,34 @@
 YOUTUBE_VIDEO_FIELDS = "items(id,snippet(description,publishedAt,tags,title))"
 
 SECRET_ARN_KEY = "SECRET_ARN"
+API_SERVER_URL_KEY = 
"ECS_example_google_api_youtube_to_s3_ExecutionApiServerUrl"

Review Comment:
   Interesting, you sure you tested with this change: #49599? That's literally 
the goal of this PR :) To automatically include a token in the request if this 
config is on



##########
devel-common/src/tests_common/test_utils/api_client_helpers.py:
##########
@@ -49,3 +56,24 @@ def generate_access_token(username: str, password: str, 
host: str) -> str:
 
     assert access_token, f"Failed to get JWT token from redirect url {url} 
with status code {login_response}"
     return access_token
+
+
+def make_authenticated_rest_api_request(
+    path: str,
+    method: str,
+    body: dict | None = None,
+    api_username: str = "admin",
+    api_password: str = "admin",
+    api_server_url: str | None = None,
+):
+    if not api_server_url:
+        api_server_url = conf.get("api", "base_url", 
fallback="http://localhost:8080";)
+    api_server_url = api_server_url.rstrip("/")
+    token = generate_access_token(api_username, api_password, api_server_url)

Review Comment:
   Interesting, you sure you tested with this change: #49599? That's literally 
the goal of this PR :) To automatically include a token in the request if this 
config is on



-- 
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