aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/http/test_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/http/test_server.go')
-rw-r--r--swarm/api/http/test_server.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/swarm/api/http/test_server.go b/swarm/api/http/test_server.go
index 928a6e972..fbb3366e2 100644
--- a/swarm/api/http/test_server.go
+++ b/swarm/api/http/test_server.go
@@ -24,6 +24,7 @@ import (
"testing"
"github.com/ethereum/go-ethereum/swarm/api"
+ "github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/storage"
"github.com/ethereum/go-ethereum/swarm/storage/feed"
"github.com/ethereum/go-ethereum/swarm/storage/localstore"
@@ -44,7 +45,9 @@ func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer, reso
t.Fatal(err)
}
- fileStore := storage.NewFileStore(localStore, storage.NewFileStoreParams())
+ tags := chunk.NewTags()
+ fileStore := storage.NewFileStore(localStore, storage.NewFileStoreParams(), tags)
+
// Swarm feeds test setup
feedsDir, err := ioutil.TempDir("", "swarm-feeds-test")
if err != nil {
@@ -56,12 +59,13 @@ func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer, reso
t.Fatal(err)
}
- swarmApi := api.NewAPI(fileStore, resolver, feeds.Handler, nil)
+ swarmApi := api.NewAPI(fileStore, resolver, feeds.Handler, nil, tags)
apiServer := httptest.NewServer(serverFunc(swarmApi))
tss := &TestSwarmServer{
Server: apiServer,
FileStore: fileStore,
+ Tags: tags,
dir: swarmDir,
Hasher: storage.MakeHashFunc(storage.DefaultHash)(),
cleanup: func() {
@@ -81,6 +85,7 @@ type TestSwarmServer struct {
*httptest.Server
Hasher storage.SwarmHash
FileStore *storage.FileStore
+ Tags *chunk.Tags
dir string
cleanup func()
CurrentTime uint64