Skip to content
Permalink
Browse files

Better test errors when geoip2 files weren't found

  • Loading branch information...
abh committed Apr 9, 2019
1 parent fbc5e00 commit 7fda5b63436bef61da159a916e1fe4d5719739c3
Showing with 5 additions and 1 deletion.
  1. +5 −1 zones/reader_test.go
@@ -16,7 +16,11 @@ func loadZones(t *testing.T) *MuxManager {

if targeting.Geo() == nil {
t.Logf("Setting up geo provider")
geoprovider, err := geoip2.New(geoip2.FindDB())
dbDir := geoip2.FindDB()
if len(dbDir) == 0 {
t.Fatalf("Could not find geoip directory")
}
geoprovider, err := geoip2.New(dbDir)
if err == nil {
targeting.Setup(geoprovider)
} else {

0 comments on commit 7fda5b6

Please sign in to comment.
You can’t perform that action at this time.