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 <richard67@users.noreply.github.com>

* Added port for postgres in db.js

---------

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
This commit is contained in:
andyforrest 2023-06-14 15:18:18 +01:00 committed by GitHub
parent f593ab782d
commit b777e56be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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: '',

View File

@ -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,
@ -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,