aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/testutil
diff options
context:
space:
mode:
authorElad <theman@elad.im>2018-09-06 18:08:39 +0800
committerBalint Gabor <balint.g@gmail.com>2018-09-06 18:08:39 +0800
commit4c15ffffdd0aaf3b834be88ff7e7d9ea938c45b4 (patch)
tree3071db57fa413596e4d9bd5bff5041eeeef0f2c8 /swarm/testutil
parent5918b88a8f8be34f39b8df94d146f77ac9b4fbfc (diff)
downloaddexon-4c15ffffdd0aaf3b834be88ff7e7d9ea938c45b4.tar.gz
dexon-4c15ffffdd0aaf3b834be88ff7e7d9ea938c45b4.tar.zst
dexon-4c15ffffdd0aaf3b834be88ff7e7d9ea938c45b4.zip
swarm/api/http: added a regression test for resolver bug from #17483 (#17502)
Diffstat (limited to 'swarm/testutil')
-rw-r--r--swarm/testutil/http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/swarm/testutil/http.go b/swarm/testutil/http.go
index 7fd60fcc3..074823032 100644
--- a/swarm/testutil/http.go
+++ b/swarm/testutil/http.go
@@ -45,7 +45,7 @@ func (f *fakeTimeProvider) Now() mru.Timestamp {
return mru.Timestamp{Time: f.currentTime}
}
-func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer) *TestSwarmServer {
+func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer, resolver api.Resolver) *TestSwarmServer {
dir, err := ioutil.TempDir("", "swarm-storage-test")
if err != nil {
t.Fatal(err)
@@ -77,7 +77,7 @@ func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer) *Tes
t.Fatal(err)
}
- a := api.NewAPI(fileStore, nil, rh.Handler, nil)
+ a := api.NewAPI(fileStore, resolver, rh.Handler, nil)
srv := httptest.NewServer(serverFunc(a))
return &TestSwarmServer{
Server: srv,