This commit is contained in:
Ethan Knowlton 2023-10-10 16:31:22 -04:00
parent d9bf3259e0
commit 7d2aab397c
1 changed files with 8 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import (
"testing"
"github.com/levelsoftware/echoip/cache"
"github.com/levelsoftware/echoip/config"
"github.com/levelsoftware/echoip/iputil"
"github.com/levelsoftware/echoip/iputil/geo"
parser "github.com/levelsoftware/echoip/iputil/paser"
@ -84,7 +85,13 @@ func (fc *FakeCache) Set(ctx context.Context, ip string, response cache.CachedRe
func testServer() *Server {
fakeCache := FakeCache{}
return &Server{cache: &fakeCache, cacheTtl: 100, parser: &testDb{}, LookupAddr: lookupAddr, LookupPort: lookupPort}
return &Server{
cache: &fakeCache,
parser: &testDb{},
LookupAddr: lookupAddr,
LookupPort: lookupPort,
runConfig: &config.Config{},
}
}
func httpGet(url string, acceptMediaType string, userAgent string) (string, int, error) {