Skip to content

Commit 32b0545

Browse files
committed
Set PS to auto install
1 parent a296952 commit 32b0545

File tree

7 files changed

+4
-9
lines changed

7 files changed

+4
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
-e DB_NAME=prestashop \
5858
-e DB_USER=root \
5959
-e DB_PASSWD=prestashop \
60-
-e PS_INSTALL_AUTO=0 \
60+
-e PS_INSTALL_AUTO=1 \
6161
prestashop/prestashop:${{ matrix.ps-version }}
6262
6363
- name: Wait for PrestaShop to be ready
@@ -116,7 +116,8 @@ jobs:
116116
117117
- name: Create testing database for Integration tests
118118
run: |
119-
docker exec prestashop-${{ matrix.module }} bash -c "cd /var/www/html/modules/ps_checkout && php tests/create-test-database.php"
119+
docker exec prestashop-${{ matrix.module }} bash -c "cd /var/www/html && php bin/console prestashop:module install ps_checkout"
120+
docker exec prestashop-${{ matrix.module }} bash -c "cd /var/www/html/modules/ps_checkout && php -d display_errors=1 -d error_reporting=E_ALL tests/create-test-database.php"
120121
121122
- name: Run Infrastructure Integration Tests
122123
continue-on-error: true

core/tests/bootstrap-integration.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
define('_PS_FRONT_', true); // Ensure front is enabled in the test environment
1010
}
1111

12-
require_once 'create-test-database.php';
13-
1412
require_once $projectDir . 'vendor/autoload.php';
1513
require_once $rootDirectory . 'config/config.inc.php';
1614

infrastructure/tests/bootstrap-integration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
if (!getenv('IS_CI')) {
2424
define('_PS_IN_TEST_', true);
25-
define('_DB_NAME_', 'prestashop'); // todo remove once test database is created.
2625
}
2726

2827
require_once $projectDir . 'vendor/autoload.php';

ps17/tests/bootstrap-integration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
if (!getenv('IS_CI')) {
2525
define('_PS_IN_TEST_', true);
26-
define('_DB_NAME_', 'prestashop'); // todo remove once test database is created.
2726
}
2827

2928
require_once $projectDir . 'vendor/autoload.php';

ps8/tests/bootstrap-integration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
if (!getenv('IS_CI')) {
2525
define('_PS_IN_TEST_', true);
26-
define('_DB_NAME_', 'prestashop'); // todo remove once test database is created.
2726
}
2827

2928
require_once $projectDir . 'vendor/autoload.php';

ps8/tests/create-test-database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
require_once $rootDirectory . 'autoload.php';
1515
}
1616

17-
$sourceHost = defined('_DB_SERVER_') ? _DB_SERVER_ : 'mysql';
17+
$sourceHost = 'mysql';
1818
$sourceUser = defined('_DB_USER_') ? _DB_USER_ : 'root';
1919
$sourcePassword = defined('_DB_PASSWD_') ? _DB_PASSWD_ : 'prestashop';
2020
$sourceDatabase = defined('_DB_NAME_') ? _DB_NAME_ : 'prestashop';

ps9/tests/bootstrap-integration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
if (!getenv('IS_CI')) {
2525
define('_PS_IN_TEST_', true);
26-
define('_DB_NAME_', 'prestashop'); // todo remove once test database is created.
2726
}
2827

2928
require_once $projectDir . 'vendor/autoload.php';

0 commit comments

Comments
 (0)