Revanth14 commented on code in PR #68700:
URL: https://github.com/apache/airflow/pull/68700#discussion_r3439334914
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -153,6 +153,17 @@ def test_get_should_respond_200(self, test_client,
testing_team, session):
assert body["conn_type"] == TEST_CONN_TYPE
assert body["team_name"] == testing_team.name
+ def test_get_should_return_existing_connection_with_invalid_port(self,
test_client, session):
+ session.execute(
+ Connection.__table__.insert().values(conn_id=TEST_CONN_ID,
conn_type=TEST_CONN_TYPE, port=0)
+ )
Review Comment:
Applied, thanks.
I kept `_validate_port=False` here because this test is intentionally
seeding legacy invalid data. Without that flag, constructing `Connection(...,
port=0)` would exercise the new creation validation and raise before the `GET`
response behavior can be tested.
--
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]