Browse Source

Add test-data folder

Andrey Blinov 6 years ago
parent
commit
85219bdf2c
3 changed files with 2 additions and 1 deletions
  1. 1 0
      .travis.yml
  2. 1 1
      handler_test.go
  3. BIN
      test-data/GeoLite2-City.mmdb

+ 1 - 0
.travis.yml

@@ -4,5 +4,6 @@ go:
 
 before_script:
 - go get -u github.com/mholt/caddy
+- go get -u github.com/oschwald/maxminddb-golang
 
 script: go test .

+ 1 - 1
handler_test.go

@@ -12,7 +12,7 @@ import (
 )
 
 func TestToResolveGeoip(t *testing.T) {
-	dbhandler, err := maxminddb.Open("./db/GeoLite2-City.mmdb")
+	dbhandler, err := maxminddb.Open("./test-data/GeoLite2-City.mmdb")
 	if err != nil {
 		t.Errorf("geoip: Can't open database: GeoLite2-City.mmdb")
 	}

BIN
test-data/GeoLite2-City.mmdb