Skip to content

[#155] Fix test_is_server_ready and add missing global in status checks#156

Merged
dmitriim merged 3 commits into
catalyst:MOODLE_404_STABLEfrom
tsmilan:issue-155
Mar 27, 2026
Merged

[#155] Fix test_is_server_ready and add missing global in status checks#156
dmitriim merged 3 commits into
catalyst:MOODLE_404_STABLEfrom
tsmilan:issue-155

Conversation

@tsmilan

@tsmilan tsmilan commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This MR fixes the two issues raised in #155

  • The is_server_ready PHPUnit data provider now uses a non‑empty hostname for the “503” case so that get_url() returns a valid URL and triggers the status code branch.
  • The search_elastic_status_checks() function in lib.php now declares global $CFG; restoring the Elastic check in Site administration > Reports > System status.

Testing

  1. Run the Elasticsearch testsuite:
    vendor/bin/phpunit --testsuite=search_elastic_testsuite
    → All cases, including the 503 branch, should pass.
  2. Log in as an administrator and navigate to Site administration > Reports > System status.
    → The “Elasticsearch server connection” check appears under status checks.

Closes #155

@dmitriim dmitriim merged commit 8c160c9 into catalyst:MOODLE_404_STABLE Mar 27, 2026
19 checks passed
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.

Fix is_server_ready_provider case and add missing global $CFG in status checks

2 participants