Skip to content

Make url_base and root_doc consistents in testing env #19831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cedric-anne
Copy link
Member

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.

Description

The initial url_base in the testing env was http://localhost/glpi (as defined in the empty_data.php file, but the execution through tests/run_tests.sh script was changing it to http://localhost:80 (to match the actual address available through docker). Depending on how the tests were executed, some tests were failing.

To prevent unexpected test failures, I changed the default url_base from http://localhost/glpi to http://localhost/ in the empty_data.php file, so whatever the way the tests are executed, the CFG_GLPI['url_base'] and the CFG_GLPI['root_doc'] will always be consistent.

@cedric-anne cedric-anne self-assigned this May 28, 2025
@cedric-anne
Copy link
Member Author

Removing the :80 port indication from the base URL in the E2E test context reveals an issue with the webcal URL computation. I fixed it in the second commit.

@SebSept
Copy link
Contributor

SebSept commented May 28, 2025

👍🏼 fixes my prob with phpunit/functional/TicketTest.php testScreenshotConvertedIntoDocument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants