test(coreapi): use a thread-safe datastore everywhere
fixes https://github.com/libp2p/go-libp2p-kad-dht/issues/321 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Apr 15, 2019 at 17:21 UTC
f8c8f383db32a9d1ea13d4300b009b1de7a02915
1 file changed
+2
-2
core/coreapi/test/api_test.go
+2
-2
@@ -71,10 +71,10 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
71
c.Identity = ident
72
c.Experimental.FilestoreEnabled = true
73
74
- ds := datastore.NewMapDatastore()
74
+ ds := syncds.MutexWrap(datastore.NewMapDatastore())
75
r := &repo.Mock{
76
C: c,
77
- D: syncds.MutexWrap(ds),
77
+ D: ds,
78
K: keystore.NewMemKeystore(),
79
F: filestore.NewFileManager(ds, filepath.Dir(os.TempDir())),
80
}