File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# CockroachDB connection settings for Docker
1313COCKROACHDB_HOST = os .environ .get ("COCKROACHDB_HOST" , "localhost" )
1919
2020def cockroachdb_available () -> bool :
2121 """Check if CockroachDB is available."""
22- return is_port_open (COCKROACHDB_HOST , COCKROACHDB_PORT )
22+ return is_binary_port_open (COCKROACHDB_HOST , COCKROACHDB_PORT )
2323
2424
2525@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212DB2_HOST = os .environ .get ("DB2_HOST" , "localhost" )
1313DB2_PORT = int (os .environ .get ("DB2_PORT" , "50000" ))
1818
1919def db2_available () -> bool :
2020 """Check if Db2 is available."""
21- return is_port_open (DB2_HOST , DB2_PORT )
21+ return is_binary_port_open (DB2_HOST , DB2_PORT )
2222
2323
2424@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212FIREBIRD_HOST = os .environ .get ("FIREBIRD_HOST" , "localhost" )
1313FIREBIRD_PORT = int (os .environ .get ("FIREBIRD_PORT" , "3050" ))
1818
1919def firebird_available () -> bool :
2020 """Check if Firebird is available."""
21- return is_port_open (FIREBIRD_HOST , FIREBIRD_PORT )
21+ return is_binary_port_open (FIREBIRD_HOST , FIREBIRD_PORT )
2222
2323
2424@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 88
99import pytest
1010
11- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
11+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1212
1313IMPALA_HOST = os .environ .get ("IMPALA_HOST" , "localhost" )
1414IMPALA_PORT = int (os .environ .get ("IMPALA_PORT" , "21050" ))
1818
1919def impala_available () -> bool :
2020 """Check if Impala is available."""
21- return is_port_open (IMPALA_HOST , IMPALA_PORT )
21+ return is_binary_port_open (IMPALA_HOST , IMPALA_PORT )
2222
2323
2424@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# Note: Using 127.0.0.1 instead of localhost to force TCP connection (localhost uses Unix socket)
1313MARIADB_HOST = os .environ .get ("MARIADB_HOST" , "127.0.0.1" )
1919
2020def mariadb_available () -> bool :
2121 """Check if MariaDB is available."""
22- return is_port_open (MARIADB_HOST , MARIADB_PORT )
22+ return is_binary_port_open (MARIADB_HOST , MARIADB_PORT )
2323
2424
2525@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# TIS-620 (Thai) MariaDB
1313MARIADB_TIS620_HOST = os .environ .get ("MARIADB_TIS620_HOST" , "127.0.0.1" )
2525
2626def mariadb_tis620_available () -> bool :
2727 """Check if MariaDB TIS-620 is available."""
28- return is_port_open (MARIADB_TIS620_HOST , MARIADB_TIS620_PORT )
28+ return is_binary_port_open (MARIADB_TIS620_HOST , MARIADB_TIS620_PORT )
2929
3030
3131def mariadb_latin1_available () -> bool :
3232 """Check if MariaDB Latin1 is available."""
33- return is_port_open (MARIADB_LATIN1_HOST , MARIADB_LATIN1_PORT )
33+ return is_binary_port_open (MARIADB_LATIN1_HOST , MARIADB_LATIN1_PORT )
3434
3535
3636@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212MSSQL_HOST = os .environ .get ("MSSQL_HOST" , "localhost" )
1313MSSQL_PORT = int (os .environ .get ("MSSQL_PORT" , "1434" ))
1818
1919def mssql_available () -> bool :
2020 """Check if SQL Server is available."""
21- return is_port_open (MSSQL_HOST , MSSQL_PORT )
21+ return is_binary_port_open (MSSQL_HOST , MSSQL_PORT )
2222
2323
2424@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# Note: We use root user because MySQL's testuser only has localhost access inside the container
1313MYSQL_HOST = os .environ .get ("MYSQL_HOST" , "localhost" )
1919
2020def mysql_available () -> bool :
2121 """Check if MySQL is available."""
22- return is_port_open (MYSQL_HOST , MYSQL_PORT )
22+ return is_binary_port_open (MYSQL_HOST , MYSQL_PORT )
2323
2424
2525@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# TIS-620 (Thai) MySQL
1313MYSQL_TIS620_HOST = os .environ .get ("MYSQL_TIS620_HOST" , "localhost" )
2525
2626def mysql_tis620_available () -> bool :
2727 """Check if MySQL TIS-620 is available."""
28- return is_port_open (MYSQL_TIS620_HOST , MYSQL_TIS620_PORT )
28+ return is_binary_port_open (MYSQL_TIS620_HOST , MYSQL_TIS620_PORT )
2929
3030
3131def mysql_latin1_available () -> bool :
3232 """Check if MySQL Latin1 is available."""
33- return is_port_open (MYSQL_LATIN1_HOST , MYSQL_LATIN1_PORT )
33+ return is_binary_port_open (MYSQL_LATIN1_HOST , MYSQL_LATIN1_PORT )
3434
3535
3636@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change 77
88import pytest
99
10- from tests .fixtures .utils import cleanup_connection , is_port_open , run_cli
10+ from tests .fixtures .utils import cleanup_connection , is_binary_port_open , run_cli
1111
1212# Oracle connection settings for Docker
1313ORACLE_HOST = os .environ .get ("ORACLE_HOST" , "localhost" )
1919
2020def oracle_available () -> bool :
2121 """Check if Oracle is available."""
22- return is_port_open (ORACLE_HOST , ORACLE_PORT )
22+ return is_binary_port_open (ORACLE_HOST , ORACLE_PORT )
2323
2424
2525@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments