User tests: Successful: Unsuccessful:
Currently, Unix sockets do not work in Cypress System Tests. This enhancement is aimed at enabling their functionality.
See backend | Global Configuration | Server Database:
Check if db_host
is a Unix socket by verifying the unix:/
prefix. All JavaScript drivers does not handle this prefix, it needs to be stripped. This approach maintains compatibility with the PHP drivers and allows to have Cypress.config.mjs
working for installation step (PHP driver) and custom database commands (JavaScript driver).
This change has already been tested with the NPM module pg
replacment from #44084.
One option for testing is using JBT >= 1.0.24, as described here. Doing installation with MariaDB and MySQLi driver, test one spec with database custom commands. Installation step is already executed == tested with scripts/created
or scripts/database
. Watching progress and errors with noVNC:
scripts/create 44 mariadbi socket
scripts/test 44 system novnc administrator/components/com_users/Users.cy.js
Repeat for the other four database variants:
foreach variant in "mysqli" "mysql" "mariadb" "pgsql"; do
scripts/database 44 $variant socket
scripts/test 44 system novnc administrator/components/com_users/Users.cy.js
done
Install Joomla Patch Tester and "Apply Patch" 44092 in backend
scripts/patchtester
And repeat the tests:
foreach variant in "mariadbi" "mysqli" "mysql" "mariadb" "pgsql"; do
scripts/database 44 $variant socket
scripts/test 44 system novnc administrator/components/com_users/Users.cy.js
done
Final run overall System Tests suite for one database variant:
scripts/test 44 system
The administrator/components/com_users/Users.cy.js
4 of the 6 tests fail with e.g.
getaddrinfo ENOTFOUND unix:/jbt/run/mariadb-socket/mysqld.sock
Installation step and System Tests with custom database commands work for all database variants.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Unit Tests |
Thank you for notice 👍 and I am wondering that Drone is running on DRAFT PR
Yes, no difference between draft and not draft for ci tests.
Labels |
Added:
Unit/System Tests
PR-4.4-dev
|
Title |
|
I have tested this item ✅ successfully on ce35190
Can you rebase this one to 5.2?
Category | JavaScript Unit Tests | ⇒ | Unit Tests Repository Administration com_admin SQL |
Rebased to 5.2-dev and tested on macOS with mariadbi using Unix sockets in creating instance from PR branch:
scripts/create 52 socket https://github.com/muhme/joomla-cms:sockets-for-system-tests
scripts/test 52 system
Used as db_host
is unix:/var/run/mariadb-socket/mysqld.sock
. System Tests are passed succesfully. ✅
Labels |
Added:
PR-5.2-dev
Removed: PR-4.4-dev |
Category | Unit Tests Repository Administration com_admin SQL | ⇒ | JavaScript Unit Tests |
Can you fix the conflicts?
Fixed the merge conflicts and tested again, this time with PostgreSQL Unix sockets and using the new pg
NPM module:
scripts/create 52 pgsql socket https://github.com/muhme/joomla-cms:sockets-for-system-tests
scripts/test 52 system
Verified pg
is used in branch_52/tests/System/plugins/db.mjs
and db_host
is set asunix:/var/run/postgresql-socket
. System Tests are passed succesfully. ✅
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-24 05:34:57 |
Closed_By | ⇒ | laoneo |
Thanks!
Drone reports JavaScript code style issues: https://ci.joomla.org/joomla/joomla-cms/78953/1/33