Skip to content

Commit a11bf80

Browse files
committed
use "sql1" host (MSSQL docker) everywhere
1 parent 4b93033 commit a11bf80

File tree

6 files changed

+47
-30
lines changed

6 files changed

+47
-30
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create MSSQL container
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
docker run \
9+
-e "ACCEPT_EULA=Y" \
10+
-e "SA_PASSWORD=<YourStrong@Passw0rd>" \
11+
-p 1433:1433 \
12+
--name sql1 \
13+
-h sql1 \
14+
-d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04

.github/actions/setup-x64/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
1515
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
1616
sudo -u postgres psql -c "CREATE DATABASE test;"
17+
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
1718
sudo locale-gen de_DE
1819
1920
./.github/scripts/setup-slapd.sh &>/dev/null

.github/workflows/push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ jobs:
146146
steps:
147147
- name: git checkout
148148
uses: actions/checkout@v2
149+
- name: Create MSSQL container
150+
uses: ./.github/actions/setup-mssql
149151
- name: Create Oracle container
150152
uses: ./.github/actions/setup-oracle
151153
- name: apt

ext/oci8/tests/extauth_01.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ oci8.privileged_connect=1
1414
echo "Test 1\n";
1515

1616
$tt = microtime(true);
17-
$c = oci_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
17+
$c = oci_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
1818
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
1919
if (!$c) {
2020
$m = oci_error();
@@ -25,7 +25,7 @@ var_dump($c);
2525
echo "Test 2\n";
2626

2727
$tt = microtime(true);
28-
$c = oci_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
28+
$c = oci_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
2929
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
3030
if (!$c) {
3131
$m = oci_error();
@@ -36,7 +36,7 @@ var_dump($c);
3636
echo "Test 3\n";
3737

3838
$tt = microtime(true);
39-
$c = oci_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT);
39+
$c = oci_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT);
4040
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
4141
if (!$c) {
4242
$m = oci_error();
@@ -47,7 +47,7 @@ var_dump($c);
4747
echo "Test 4\n";
4848

4949
$tt = microtime(true);
50-
$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER);
50+
$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER);
5151
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
5252
if (!$c) {
5353
$m = oci_error();
@@ -58,7 +58,7 @@ var_dump($c);
5858
echo "Test 5\n";
5959

6060
$tt = microtime(true);
61-
$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
61+
$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
6262
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
6363
if (!$c) {
6464
$m = oci_error();
@@ -69,7 +69,7 @@ var_dump($c);
6969
echo "Test 6\n";
7070

7171
$tt = microtime(true);
72-
$c = oci_connect('', '', 'x.cz', null, OCI_CRED_EXT);
72+
$c = oci_connect('', '', 'sql1', null, OCI_CRED_EXT);
7373
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
7474
if (!$c) {
7575
$m = oci_error();
@@ -80,7 +80,7 @@ var_dump($c);
8080
echo "Test 7\n";
8181

8282
$tt = microtime(true);
83-
$c = oci_connect('/', '', 'x.cz', null, OCI_CRED_EXT);
83+
$c = oci_connect('/', '', 'sql1', null, OCI_CRED_EXT);
8484
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
8585
if (!$c) {
8686
$m = oci_error();
@@ -91,7 +91,7 @@ var_dump($c);
9191
echo "Test 8\n";
9292

9393
$tt = microtime(true);
94-
$c = oci_connect('/', null, 'x.cz', null, OCI_CRED_EXT);
94+
$c = oci_connect('/', null, 'sql1', null, OCI_CRED_EXT);
9595
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
9696
if (!$c) {
9797
$m = oci_error();
@@ -102,7 +102,7 @@ var_dump($c);
102102
echo "Test 9\n";
103103

104104
$tt = microtime(true);
105-
$c = oci_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT);
105+
$c = oci_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT);
106106
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
107107
if (!$c) {
108108
$m = oci_error();
@@ -113,7 +113,7 @@ var_dump($c);
113113
echo "Test 10\n";
114114

115115
$tt = microtime(true);
116-
$c = oci_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT);
116+
$c = oci_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT);
117117
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
118118
if (!$c) {
119119
$m = oci_error();

ext/oci8/tests/extauth_02.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ oci8.privileged_connect=1
1414
echo "Test 1\n";
1515

1616
$tt = microtime(true);
17-
$c = oci_new_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
17+
$c = oci_new_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
1818
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
1919
if (!$c) {
2020
$m = oci_error();
@@ -25,7 +25,7 @@ var_dump($c);
2525
echo "Test 2\n";
2626

2727
$tt = microtime(true);
28-
$c = oci_new_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
28+
$c = oci_new_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
2929
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
3030
if (!$c) {
3131
$m = oci_error();
@@ -36,7 +36,7 @@ var_dump($c);
3636
echo "Test 3\n";
3737

3838
$tt = microtime(true);
39-
$c = oci_new_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT);
39+
$c = oci_new_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT);
4040
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
4141
if (!$c) {
4242
$m = oci_error();
@@ -47,7 +47,7 @@ var_dump($c);
4747
echo "Test 4\n";
4848

4949
$tt = microtime(true);
50-
$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER);
50+
$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER);
5151
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
5252
if (!$c) {
5353
$m = oci_error();
@@ -58,7 +58,7 @@ var_dump($c);
5858
echo "Test 5\n";
5959

6060
$tt = microtime(true);
61-
$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
61+
$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
6262
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
6363
if (!$c) {
6464
$m = oci_error();
@@ -69,7 +69,7 @@ var_dump($c);
6969
echo "Test 6\n";
7070

7171
$tt = microtime(true);
72-
$c = oci_new_connect('', '', 'x.cz', null, OCI_CRED_EXT);
72+
$c = oci_new_connect('', '', 'sql1', null, OCI_CRED_EXT);
7373
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
7474
if (!$c) {
7575
$m = oci_error();
@@ -80,7 +80,7 @@ var_dump($c);
8080
echo "Test 7\n";
8181

8282
$tt = microtime(true);
83-
$c = oci_new_connect('/', '', 'x.cz', null, OCI_CRED_EXT);
83+
$c = oci_new_connect('/', '', 'sql1', null, OCI_CRED_EXT);
8484
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
8585
if (!$c) {
8686
$m = oci_error();
@@ -91,7 +91,7 @@ var_dump($c);
9191
echo "Test 8\n";
9292

9393
$tt = microtime(true);
94-
$c = oci_new_connect('/', null, 'x.cz', null, OCI_CRED_EXT);
94+
$c = oci_new_connect('/', null, 'sql1', null, OCI_CRED_EXT);
9595
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
9696
if (!$c) {
9797
$m = oci_error();
@@ -102,7 +102,7 @@ var_dump($c);
102102
echo "Test 9\n";
103103

104104
$tt = microtime(true);
105-
$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT);
105+
$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT);
106106
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
107107
if (!$c) {
108108
$m = oci_error();
@@ -113,7 +113,7 @@ var_dump($c);
113113
echo "Test 10\n";
114114

115115
$tt = microtime(true);
116-
$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT);
116+
$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT);
117117
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
118118
if (!$c) {
119119
$m = oci_error();

ext/oci8/tests/extauth_03.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ oci8.privileged_connect=1
1414
echo "Test 1\n";
1515

1616
$tt = microtime(true);
17-
$c = oci_pconnect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
17+
$c = oci_pconnect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
1818
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
1919
if (!$c) {
2020
$m = oci_error();
@@ -25,7 +25,7 @@ var_dump($c);
2525
echo "Test 2\n";
2626

2727
$tt = microtime(true);
28-
$c = oci_pconnect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT);
28+
$c = oci_pconnect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT);
2929
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
3030
if (!$c) {
3131
$m = oci_error();
@@ -36,7 +36,7 @@ var_dump($c);
3636
echo "Test 3\n";
3737

3838
$tt = microtime(true);
39-
$c = oci_pconnect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT);
39+
$c = oci_pconnect('notemtpy', '', 'sql1', null, OCI_CRED_EXT);
4040
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
4141
if (!$c) {
4242
$m = oci_error();
@@ -47,7 +47,7 @@ var_dump($c);
4747
echo "Test 4\n";
4848

4949
$tt = microtime(true);
50-
$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER);
50+
$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER);
5151
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
5252
if (!$c) {
5353
$m = oci_error();
@@ -58,7 +58,7 @@ var_dump($c);
5858
echo "Test 5\n";
5959

6060
$tt = microtime(true);
61-
$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
61+
$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT);
6262
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
6363
if (!$c) {
6464
$m = oci_error();
@@ -69,7 +69,7 @@ var_dump($c);
6969
echo "Test 6\n";
7070

7171
$tt = microtime(true);
72-
$c = oci_pconnect('', '', 'x.cz', null, OCI_CRED_EXT);
72+
$c = oci_pconnect('', '', 'sql1', null, OCI_CRED_EXT);
7373
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
7474
if (!$c) {
7575
$m = oci_error();
@@ -80,7 +80,7 @@ var_dump($c);
8080
echo "Test 7\n";
8181

8282
$tt = microtime(true);
83-
$c = oci_pconnect('/', '', 'x.cz', null, OCI_CRED_EXT);
83+
$c = oci_pconnect('/', '', 'sql1', null, OCI_CRED_EXT);
8484
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
8585
if (!$c) {
8686
$m = oci_error();
@@ -91,7 +91,7 @@ var_dump($c);
9191
echo "Test 8\n";
9292

9393
$tt = microtime(true);
94-
$c = oci_pconnect('/', null, 'x.cz', null, OCI_CRED_EXT);
94+
$c = oci_pconnect('/', null, 'sql1', null, OCI_CRED_EXT);
9595
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
9696
if (!$c) {
9797
$m = oci_error();
@@ -102,7 +102,7 @@ var_dump($c);
102102
echo "Test 9\n";
103103

104104
$tt = microtime(true);
105-
$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT);
105+
$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT);
106106
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
107107
if (!$c) {
108108
$m = oci_error();
@@ -113,7 +113,7 @@ var_dump($c);
113113
echo "Test 10\n";
114114

115115
$tt = microtime(true);
116-
$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT);
116+
$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT);
117117
echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n";
118118
if (!$c) {
119119
$m = oci_error();

0 commit comments

Comments
 (0)