-
Task
-
Resolution: Fixed
-
Minor
-
3.9.19, 3.11.12, 4.0.6, 4.1.1, 4.2
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-77040-401 -
There are some geoip tests that have a long history of failures. Failures are because:
- The system (maxmind?) is down.
- IPs change, that's life!
The first is an integration test, we are using a external system and those tests only should be run when LONGTESTS are enabled. So, when external system goes down, it doesn't affect everybody but only jobs running LONGTESTS. I think this is already that way (based on chat-discussions and pholden verifying that.
The second is about we assuming that IP x.y.w.z corresponding to City XXX, country YYYY and other attributes (latitude x....). And that's not reliable, IPs change and can move in a way it changes test expectations (changes of city, of geo-area...).
So we should make those tests to just verify that the structures (the information) returned is correct and done. Say:
- We get a country name.
- We get a city name.
- We get a float latitude...
- ... (cover as much as possible about the structure).
And avoid any verification about the specific contents, because they can change. Maybe the country is stable (I think ranges are assigned), but everything else is subject to change.
This is a followup of MDL-77036 (and a long history of similar issues).
Ciao