-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[cypress] Database Unix Sockets for System Tests #44092
Conversation
Drone reports JavaScript code style issues: https://ci.joomla.org/joomla/joomla-cms/78953/1/33 |
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. |
I have tested this item ✅ successfully on ce35190 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44092. |
Can you rebase this one to 5.2? |
Check if db_host is a Unix socket by verifying the "unix:/" prefix. 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).
ce35190
to
f95de5b
Compare
Rebased to 5.2-dev and tested on macOS with mariadbi using Unix sockets in creating instance from PR branch:
Used as |
Can you fix the conflicts? |
Fixed the merge conflicts and tested again, this time with PostgreSQL Unix sockets and using the new
Verified |
Thanks! |
Summary of Changes
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 theunix:/
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 haveCypress.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.Testing Instructions
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
orscripts/database
. Watching progress and errors with noVNC:Repeat for the other four database variants:
Install Joomla Patch Tester and "Apply Patch" 44092 in backend
And repeat the tests:
Final run overall System Tests suite for one database variant:
Actual result BEFORE applying this Pull Request
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
Expected result AFTER applying this Pull Request
Installation step and System Tests with custom database commands work for all database variants.
Link to documentations
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