Add DBIP city database and improve geo test coverage
- Add dbip-city-lite package to devenv for GeoIP testing - Set GEOIP_DATABASE_PATH env var to point to the MMDB database - Add tests for initGeoReader double-init and error handling - Add real database tests for IP lookups (US, AU, DE, GB) - Make real database tests conditional with describe.skipIf - Improve test coverage from ~97% to 98.82% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
git
|
||||
dbmate
|
||||
ast-grep
|
||||
dbip-city-lite
|
||||
];
|
||||
|
||||
dotenv.enable = true;
|
||||
@@ -39,6 +40,7 @@
|
||||
env = {
|
||||
DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard?sslmode=disable";
|
||||
TEST_DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard_test?sslmode=disable";
|
||||
GEOIP_DATABASE_PATH = "${pkgs.dbip-city-lite}/share/dbip/dbip-city-lite.mmdb";
|
||||
};
|
||||
|
||||
scripts = {
|
||||
|
||||
Reference in New Issue
Block a user