-
Bug
-
Resolution: Fixed
-
Minor
-
3.9 regressions, 4.2.2
-
MOODLE_402_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-79477-401 -
1) tool_moodlenet\local\remote_resource_test::test_network_features
Failed asserting that -1 is greater than 0.
This test was added by MDL-67883, when MoodleNet was added to core. It assumes that curl_getinfo()'s download_content_length value will be greater than zero on success. However, the default test URL is http://download.moodle.org/unittest/test.html and CloudFlare does not return a Content-Length header, so curl returns -1.
The content-length of the download. This is the value read from theĀ Content-Length: field. -1 if the size isn't known
The two options that I thought of:
- Modify the test to accept -1 as a valid value.
- Change the HEAD request to a GET request and return size_download instead of download_content_length.
- has a non-specific relationship to
-
MDL-79361 Remove assertions/code related to HTTP status messages
-
- Development in progress
-