feat: add support for catalogs (#28416)

This commit is contained in:
Beto Dealmeida
2024-05-16 12:49:31 -04:00
committed by GitHub
parent b1f85dce71
commit 5da6d2bd88
14 changed files with 504 additions and 62 deletions

View File

@@ -3281,7 +3281,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "bigquery://{project_id}",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"supports_dynamic_catalog": True,
"disable_ssh_tunneling": True,
},
},

View File

@@ -167,7 +167,7 @@ class TestDatabaseModel(SupersetTestCase):
model._get_sqla_engine()
call_args = mocked_create_engine.call_args
assert str(call_args[0][0]) == "presto://gamma@localhost"
assert str(call_args[0][0]) == "presto://gamma@localhost/"
assert call_args[1]["connect_args"] == {
"protocol": "https",
@@ -180,7 +180,7 @@ class TestDatabaseModel(SupersetTestCase):
model._get_sqla_engine()
call_args = mocked_create_engine.call_args
assert str(call_args[0][0]) == "presto://localhost"
assert str(call_args[0][0]) == "presto://localhost/"
assert call_args[1]["connect_args"] == {
"protocol": "https",
@@ -225,7 +225,7 @@ class TestDatabaseModel(SupersetTestCase):
model._get_sqla_engine()
call_args = mocked_create_engine.call_args
assert str(call_args[0][0]) == "trino://localhost"
assert str(call_args[0][0]) == "trino://localhost/"
assert call_args[1]["connect_args"]["user"] == "gamma"
model = Database(
@@ -239,7 +239,7 @@ class TestDatabaseModel(SupersetTestCase):
assert (
str(call_args[0][0])
== "trino://original_user:original_user_password@localhost"
== "trino://original_user:original_user_password@localhost/"
)
assert call_args[1]["connect_args"]["user"] == "gamma"