mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
chore: Remove database ID dependency for SSH Tunnel creation (#26989)
This commit is contained in:
@@ -37,7 +37,7 @@ def test_create_ssh_tunnel_command() -> None:
|
||||
"password": "bar",
|
||||
}
|
||||
|
||||
result = CreateSSHTunnelCommand(db.id, properties).run()
|
||||
result = CreateSSHTunnelCommand(db, properties).run()
|
||||
|
||||
assert result is not None
|
||||
assert isinstance(result, SSHTunnel)
|
||||
@@ -53,14 +53,14 @@ def test_create_ssh_tunnel_command_invalid_params() -> None:
|
||||
# If we are trying to create a tunnel with a private_key_password
|
||||
# then a private_key is mandatory
|
||||
properties = {
|
||||
"database_id": db.id,
|
||||
"database": db,
|
||||
"server_address": "123.132.123.1",
|
||||
"server_port": "3005",
|
||||
"username": "foo",
|
||||
"private_key_password": "bar",
|
||||
}
|
||||
|
||||
command = CreateSSHTunnelCommand(db.id, properties)
|
||||
command = CreateSSHTunnelCommand(db, properties)
|
||||
|
||||
with pytest.raises(SSHTunnelInvalidError) as excinfo:
|
||||
command.run()
|
||||
|
||||
Reference in New Issue
Block a user