Skip to content

Commit

Permalink
Edit/cypress port (joomla#40764)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
andyforrest and richard67 authored Jun 14, 2023
1 parent f593ab7 commit b777e56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cypress.config.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = defineConfig({
password: 'joomla-17082005',
db_type: 'MySQLi',
db_host: 'localhost',
db_port: '',
db_name: 'test_joomla',
db_user: 'root',
db_password: '',
Expand Down
2 changes: 2 additions & 0 deletions tests/System/plugins/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function queryTestDB(joomlaQuery, config) {
if (config.env.db_type === 'pgsql' || config.env.db_type === 'PostgreSQL (PDO)') {
const connection = postgres({
host: config.env.db_host,
port: config.env.db_port,
database: config.env.db_name,
username: config.env.db_user,
password: config.env.db_password,
Expand Down Expand Up @@ -73,6 +74,7 @@ function queryTestDB(joomlaQuery, config) {
// Create the connection and connect
const connection = mysql.createConnection({
host: config.env.db_host,
port: config.env.db_port,
user: config.env.db_user,
password: config.env.db_password,
database: config.env.db_name,
Expand Down

0 comments on commit b777e56

Please sign in to comment.