potiuk commented on code in PR #35160:
URL: https://github.com/apache/airflow/pull/35160#discussion_r1373305830


##########
tests/providers/amazon/aws/utils/test_connection_wrapper.py:
##########
@@ -27,14 +28,19 @@
 from airflow.models import Connection
 from airflow.providers.amazon.aws.utils.connection_wrapper import 
AwsConnectionWrapper, _ConnectionMetadata
 
+pytestmark = pytest.mark.db_test
+
+
 MOCK_AWS_CONN_ID = "mock-conn-id"
 MOCK_CONN_TYPE = "aws"
 MOCK_ROLE_ARN = "arn:aws:iam::222222222222:role/awesome-role"
 
 
 def mock_connection_factory(
     conn_id: str | None = MOCK_AWS_CONN_ID, conn_type: str | None = 
MOCK_CONN_TYPE, **kwargs
-) -> Connection:
+) -> Connection | None:
+    if os.environ.get("_AIRFLOW_SKIP_DB_TESTS") == "true":

Review Comment:
   This is also another way of dealing with accessing a DB during test 
collection - we can make it into a reacommended way if it's impractical or 
difficult  or not performant enought to avoid it.



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