Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77040

Towards better (stable) GeoIP tests...


      There are some geoip tests that have a long history of failures. Failures are because:

      1. The system (maxmind?) is down.
      2. 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).


            pholden Paul Holden
            stronk7 Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            1 Vote for this issue
            4 Start watching this issue


                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0 minutes
                Time Spent - 50 minutes

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.