Skip to content

Commit b777e56

Browse files
Edit/cypress port (#40764)
* Add db_port as environment variable to cypress config * Remove commented code in tests/System/plugins/db.js Co-authored-by: Richard Fath <[email protected]> * Added port for postgres in db.js --------- Co-authored-by: Richard Fath <[email protected]>
1 parent f593ab7 commit b777e56

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cypress.config.dist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = defineConfig({
3333
password: 'joomla-17082005',
3434
db_type: 'MySQLi',
3535
db_host: 'localhost',
36+
db_port: '',
3637
db_name: 'test_joomla',
3738
db_user: 'root',
3839
db_password: '',

tests/System/plugins/db.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function queryTestDB(joomlaQuery, config) {
3333
if (config.env.db_type === 'pgsql' || config.env.db_type === 'PostgreSQL (PDO)') {
3434
const connection = postgres({
3535
host: config.env.db_host,
36+
port: config.env.db_port,
3637
database: config.env.db_name,
3738
username: config.env.db_user,
3839
password: config.env.db_password,
@@ -73,6 +74,7 @@ function queryTestDB(joomlaQuery, config) {
7374
// Create the connection and connect
7475
const connection = mysql.createConnection({
7576
host: config.env.db_host,
77+
port: config.env.db_port,
7678
user: config.env.db_user,
7779
password: config.env.db_password,
7880
database: config.env.db_name,

0 commit comments

Comments
 (0)