Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bcmmbaga committed Feb 5, 2024
1 parent 3c4f45f commit b59c426
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions management/server/geolocation/geolocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package geolocation
import (
"os"
"path"
"sync"
"testing"

"github.com/netbirdio/netbird/util"
"github.com/stretchr/testify/assert"

"github.com/netbirdio/netbird/util"
)

// from https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoLite2-City-Test.mmdb
Expand All @@ -24,8 +26,14 @@ func TestGeoLite_Lookup(t *testing.T) {
}
}()

geo, err := NewGeolocation(tempDir)
db, err := openDB(mmdbPath)
assert.NoError(t, err)

geo := &Geolocation{
mux: &sync.RWMutex{},
db: db,
stopCh: make(chan struct{}),
}
assert.NotNil(t, geo)
defer func() {
err = geo.Stop()
Expand Down

0 comments on commit b59c426

Please sign in to comment.