hussein-awala commented on code in PR #33531:
URL: https://github.com/apache/airflow/pull/33531#discussion_r1299351480
##########
tests/models/test_connection.py:
##########
@@ -118,6 +118,39 @@ class TestConnection:
None,
r"Invalid connection string:
type://user:pass@protocol://host:port?param=value.",
),
+ (
+ "postgres://jdbc:postgresql://10.0.0.1",
+ "postgres",
+ "jdbc:postgresql://10.0.0.1",
+ None,
+ None,
+ None,
+ "",
+ {},
+ r"Invalid connection string:
postgres://jdbc:postgresql://10.0.0.1.",
+ ),
+ (
+ "jdbc:postgresql://user:[email protected]/database",
+ "jdbc",
+ "postgresql://user:[email protected]/database",
Review Comment:
IMO for Airflow connection uri, we should only accept `<conn type>://<conn
url>` (and remove all the connections which doesn't have a type in the unit
tests or add a type by default like `default://<conn url>`).
There is no reason to consider the jdbc as conn type and schema at the same
time in the provided uri.
--
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]