I am integrating my application with some country-detection module. Overall logic is:
- detect client IP
- lookup IP in Geo IP DB (for simplicity let's assume it is MaxMind DB)
- identify country code based on IP
- Some other business logic based off that country code
That works very well, but I am having problems writing automated integration tests.
There is a way to override (force) certain test IPs, but the problem is that all IPs are periodically changing, and time to time I am getting my tests failed because of that.
Any ideas how to stabilize such tests? One thought I had is if there was a directory of main ISPs across the world, but could not find it.
Thanks!