Skip to content

Commit 58c09d0

Browse files
fix: pgsql and mysql port disclosure and connection
1 parent f39b029 commit 58c09d0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/actions/test-linux/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ runs:
3131
export PDO_OCI_TEST_USER="system"
3232
export PDO_OCI_TEST_PASS="pass"
3333
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
34-
export PGSQL_TEST_CONNSTR="host=postgres dbname=test port=5432 user=postgres password=postgres"
35-
export PDO_PGSQL_TEST_DSN="host=postgres dbname=test port=5432 user=postgres password=postgres"
34+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
35+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
36+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
37+
fi
3638
export ODBC_TEST_USER="odbc_test"
3739
export ODBC_TEST_PASS="password"
3840
export ODBC_TEST_DSN="Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"

.github/workflows/push.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,24 @@ jobs:
4848
services:
4949
mysql:
5050
image: mysql:8
51+
ports:
52+
- 3306:3306
5153
env:
5254
MYSQL_DATABASE: test
5355
MYSQL_ROOT_PASSWORD: root
5456
postgres:
5557
image: postgres
58+
ports:
59+
- 5432:5432
5660
env:
5761
POSTGRES_USER: postgres
5862
POSTGRES_PASSWORD: postgres
5963
POSTGRES_DB: test
6064
env:
6165
MYSQL_TEST_HOST: mysql
62-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
63-
PDO_MYSQL_TEST_HOST: mysql
66+
PDO_MYSQL_TEST_DSN: mysql:host=localhost;dbname=test
67+
PDO_MYSQL_TEST_HOST: localhost
68+
PDO_PGSQL_TEST_DSN: pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres
6469
strategy:
6570
fail-fast: false
6671
matrix:

0 commit comments

Comments
 (0)