From 4c15ffffdd0aaf3b834be88ff7e7d9ea938c45b4 Mon Sep 17 00:00:00 2001 From: Elad Date: Thu, 6 Sep 2018 12:08:39 +0200 Subject: swarm/api/http: added a regression test for resolver bug from #17483 (#17502) --- swarm/testutil/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swarm/testutil') 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, -- cgit