You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2023/07/18 14:59:42 UTC
[GitHub] [airflow] vincbeck commented on a diff in pull request #32664: Add endpoint_url in test_connection
vincbeck commented on code in PR #32664:
URL: https://github.com/apache/airflow/pull/32664#discussion_r1266906080
##########
airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -796,7 +796,10 @@ def test_connection(self):
"""
try:
session = self.get_session()
- conn_info = session.client("sts").get_caller_identity()
+ test_endpoint_url = self.conn_config.extra_config.get('test_endpoint_url') or None
+ conn_info = session.client("sts",
Review Comment:
Could you also add a unit test for this new branch
##########
airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -796,7 +796,10 @@ def test_connection(self):
"""
try:
session = self.get_session()
- conn_info = session.client("sts").get_caller_identity()
+ test_endpoint_url = self.conn_config.extra_config.get('test_endpoint_url') or None
Review Comment:
By default, `get` returns None if the key does not exist.
```suggestion
test_endpoint_url = self.conn_config.extra_config.get('test_endpoint_url')
```
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org