1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

extract update go-testutil

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2017-08-16 16:51:18 -07:00
parent 94b832df86
commit 19c3bd82a3
64 changed files with 122 additions and 542 deletions

View File

@ -6,7 +6,7 @@ import (
context "context"
"github.com/ipfs/go-ipfs/repo"
config "github.com/ipfs/go-ipfs/repo/config"
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2"
)
func TestInitialization(t *testing.T) {
@ -38,7 +38,7 @@ func TestInitialization(t *testing.T) {
for i, c := range good {
r := &repo.Mock{
C: *c,
D: testutil.ThreadSafeCloserMapDatastore(),
D: ds2.ThreadSafeCloserMapDatastore(),
}
n, err := NewNode(ctx, &BuildCfg{Repo: r})
if n == nil || err != nil {
@ -49,7 +49,7 @@ func TestInitialization(t *testing.T) {
for i, c := range bad {
r := &repo.Mock{
C: *c,
D: testutil.ThreadSafeCloserMapDatastore(),
D: ds2.ThreadSafeCloserMapDatastore(),
}
n, err := NewNode(ctx, &BuildCfg{Repo: r})
if n != nil || err == nil {