mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-04 22:10:56 +01:00
rename geo mock
This commit is contained in:
parent
63b000c3b7
commit
4a1b1799dc
@ -267,20 +267,20 @@ func cleanupMaxMindDatabases(ctx context.Context, dataDir string, mmdbFile strin
|
||||
return nil
|
||||
}
|
||||
|
||||
type GeolocationMock struct{}
|
||||
type Mock struct{}
|
||||
|
||||
func (g *GeolocationMock) Lookup(ip net.IP) (*Record, error) {
|
||||
func (g *Mock) Lookup(ip net.IP) (*Record, error) {
|
||||
return &Record{}, nil
|
||||
}
|
||||
|
||||
func (g *GeolocationMock) GetAllCountries() ([]Country, error) {
|
||||
func (g *Mock) GetAllCountries() ([]Country, error) {
|
||||
return []Country{}, nil
|
||||
}
|
||||
|
||||
func (g *GeolocationMock) GetCitiesByCountry(countryISOCode string) ([]City, error) {
|
||||
func (g *Mock) GetCitiesByCountry(countryISOCode string) ([]City, error) {
|
||||
return []City{}, nil
|
||||
}
|
||||
|
||||
func (g *GeolocationMock) Stop() error {
|
||||
func (g *Mock) Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ func initPostureChecksTestData(postureChecks ...*posture.Checks) *PostureChecksH
|
||||
return claims.AccountId, claims.UserId, nil
|
||||
},
|
||||
},
|
||||
geolocationManager: &geolocation.GeolocationMock{},
|
||||
geolocationManager: &geolocation.Mock{},
|
||||
claimsExtractor: jwtclaims.NewClaimsExtractor(
|
||||
jwtclaims.WithFromRequestContext(func(r *http.Request) jwtclaims.AuthorizationClaims {
|
||||
return jwtclaims.AuthorizationClaims{
|
||||
|
@ -1166,7 +1166,7 @@ func buildApiBlackBoxWithDBState(t *testing.T, sqlFile string, expectedPeerUpdat
|
||||
close(done)
|
||||
}()
|
||||
|
||||
geoMock := &geolocation.GeolocationMock{}
|
||||
geoMock := &geolocation.Mock{}
|
||||
validatorMock := server.MocIntegratedValidator{}
|
||||
am, err := server.BuildManager(context.Background(), store, peersUpdateManager, nil, "", "", &activity.InMemoryEventStore{}, geoMock, false, validatorMock, metrics)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user