Skip to content

Commit

Permalink
add tests for ssh tunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote authored Sep 14, 2024
1 parent 1720601 commit 9b4c44b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sql/utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from sql.utils.execute_sql import execute, execute_callback
from sql.utils.tasks import add_sql_schedule, del_schedule, task_info
from sql.utils.data_masking import data_masking, brute_mask, simple_column_mask
from sql.utils.ssh_tunnel import SSHConnection

User = Users
__author__ = "hhyo"
Expand Down Expand Up @@ -1512,3 +1513,8 @@ def test_auth_group_users(self):
auth_group_names=[self.agp.name], group_id=self.rgp1.group_id
)
self.assertIn(self.user, users)

# ssh tunnel tests
def test_get_local_ip():
tunnel = SSHConnection("mysql", 3306, "tunnel", 22, "root", "password", "", "")
assert tunnel.get_local_ip() != "127.0.0.1"

0 comments on commit 9b4c44b

Please sign in to comment.