mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-06 06:16:21 +00:00
Fix: connector for hive has double dash (#7953)
This commit is contained in:
parent
7deebe8a2c
commit
cd43f1fdcf
@ -340,9 +340,6 @@ def _(connection: HiveConnection):
|
||||
)
|
||||
|
||||
if options:
|
||||
if not connection.databaseSchema:
|
||||
url += "/"
|
||||
url += "/"
|
||||
params = "&".join(
|
||||
f"{key}={quote_plus(value)}" for (key, value) in options.items() if value
|
||||
)
|
||||
|
@ -143,6 +143,23 @@ class SouceConnectionTest(TestCase):
|
||||
)
|
||||
assert expected_result == get_connection_url(hive_conn_obj)
|
||||
|
||||
def test_hive_url_conn_options_with_db(self):
|
||||
expected_result = "hive://localhost:10000/test_db?Key=Value"
|
||||
hive_conn_obj = HiveConnection(
|
||||
hostPort="localhost:10000",
|
||||
databaseSchema="test_db",
|
||||
connectionOptions={"Key": "Value"},
|
||||
)
|
||||
assert expected_result == get_connection_url(hive_conn_obj)
|
||||
|
||||
def test_hive_url_conn_options_without_db(self):
|
||||
expected_result = "hive://localhost:10000?Key=Value"
|
||||
hive_conn_obj = HiveConnection(
|
||||
hostPort="localhost:10000",
|
||||
connectionOptions={"Key": "Value"},
|
||||
)
|
||||
assert expected_result == get_connection_url(hive_conn_obj)
|
||||
|
||||
def test_hive_url_with_kerberos_auth(self):
|
||||
expected_result = "hive://localhost:10000"
|
||||
hive_conn_obj = HiveConnection(
|
||||
|
Loading…
x
Reference in New Issue
Block a user