-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.5, 4.1.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-76841-401 -
Started happening frequently recently that we have the following failure, consistently reproduced locally (both PHP 7.4 & PHP 8.0):
$ bin/moodle-docker-compose exec webserver vendor/bin/phpunit admin/tool/mobile/tests/api_test.php --filter test_get_potential_config_issues
|
Moodle 4.2dev (Build: 20230105), b8b905cd90f7a1d0db59a70a32d47e015dcfbfea
|
Php: 7.4.33, mysqli: 5.7.40, OS: Linux 4.15.0-201-generic x86_64
|
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
|
|
F 1 / 1 (100%)
|
|
Time: 00:16.874, Memory: 60.50 MB
|
|
There was 1 failure:
|
|
1) tool_mobile\api_test::test_get_potential_config_issues
|
Failed asserting that actual size 3 matches expected size 2.
|
|
/var/www/html/admin/tool/mobile/tests/api_test.php:74
|
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80
|
|
FAILURES!
|
Tests: 1, Assertions: 1, Failures: 1.
|
Also frequently seen on GHA (sorry for picking lameze's issue ), e.g.
- https://github.com/lameze/moodle/actions/runs/3879580574
- https://github.com/lameze/moodle/actions/runs/3879606305
- https://github.com/lameze/moodle/actions/runs/3879607003
- https://github.com/lameze/moodle/actions/runs/3879608114
The problem is that the test method is receiving back selfsignedoruntrustedcertificatewarning as a "potential config issue" because of this check: https://github.com/moodle/moodle/blob/b8b905cd90f7a1d0db59a70a32d47e015dcfbfea/admin/tool/mobile/classes/api.php#L632-L639
We're sending a HEAD request to https://www.example.com which makes no sense, and is in no way under our control what this domain should/should not return