Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.5.12, 3.6.10, 3.7.6, 3.8.3, 3.9
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
-
Description
Recently I started getting this failure in all my local phpunit tests:
$ vendor/bin/phpunit -v "core_rsslib_testcase" lib/tests/rsslib_test.php
|
Moodle 3.9dev+ (Build: 20200508), 7f725f8ed4ff345e5680f34f5608c6187a96d67c
|
Php: 7.4.4, pgsql: 9.6.17, OS: Darwin 19.4.0 x86_64
|
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
|
|
Runtime: PHP 7.4.4
|
Configuration: /Users/stronk7/git_moodle/moodle/phpunit.xml
|
|
..F. 4 / 4 (100%)
|
|
Time: 773 ms, Memory: 42.00 MB
|
|
There was 1 failure:
|
|
1) core_rsslib_testcase::test_failproxy
|
Failed asserting that a NULL is not empty.
|
|
/Users/stronk7/git_moodle/moodle/lib/tests/rsslib_test.php:123
|
/Users/stronk7/git_moodle/moodle/lib/phpunit/classes/advanced_testcase.php:80
|
|
To re-run:
|
vendor/bin/phpunit -v "core_rsslib_testcase" lib/tests/rsslib_test.php
|
|
FAILURES!
|
Tests: 4, Assertions: 26, Failures: 1.
|
Any database, any php version, all moodle branches... and 100% consistently.
After looking a lot and confirming that there wasn't any change... I realised that, recently, I installed the exttests locally and I've them available under http://localhost... url.
Problem is that such url matches the default CFG->proxybypass values, hence CURL operations don't use the proxy configuration when accessing to them.
And the failing test is EXACTLY about to to use a wrong proxy configuration and detect that an error is returned. But that wrong proxy configuration isn't used (because of the reason explained above) and the rss feed is fetched without problem. Hence, the test fails.
So this issue is about to ensure, in that exact test only, that the wrong proxy is used and not excluded because of CFG->proxybypass.