提交 a5f98329 作者: Tommi Virtanen 提交者: Jeromy

gofmt generated assets

The generated file went through some changes because of differing
go-bindata versions.

License: MIT
Signed-off-by: 's avatarTommi Virtanen <tv@eagain.net>
上级 e431f35a
......@@ -197,18 +197,14 @@ func TestPinRecursiveFail(t *testing.T) {
ctx := context.Background()
dstore := dssync.MutexWrap(ds.NewMapDatastore())
bstore := blockstore.NewBlockstore(dstore)
bserv, err := bs.New(bstore, offline.Exchange(bstore))
if err != nil {
t.Fatal(err)
}
bserv := bs.New(bstore, offline.Exchange(bstore))
dserv := mdag.NewDAGService(bserv)
p := NewPinner(dstore, dserv)
a, _ := randNode()
b, _ := randNode()
err = a.AddNodeLinkClean("child", b)
err := a.AddNodeLinkClean("child", b)
if err != nil {
t.Fatal(err)
}
......@@ -232,40 +228,3 @@ func TestPinRecursiveFail(t *testing.T) {
t.Fatal(err)
}
}
func TestPinRecursiveFail(t *testing.T) {
ctx := context.Background()
dstore := dssync.MutexWrap(ds.NewMapDatastore())
bstore := blockstore.NewBlockstore(dstore)
bserv := bs.New(bstore, offline.Exchange(bstore))
dserv := mdag.NewDAGService(bserv)
p := NewPinner(dstore, dserv)
a, _ := randNode()
b, _ := randNode()
err := a.AddNodeLinkClean("child", b)
if err != nil {
t.Fatal(err)
}
// Note: this isnt a time based test, we expect the pin to fail
mctx, cancel := context.WithTimeout(ctx, time.Millisecond)
defer cancel()
err = p.Pin(mctx, a, true)
if err == nil {
t.Fatal("should have failed to pin here")
}
if _, err := dserv.Add(b); err != nil {
t.Fatal(err)
}
// this one is time based... but shouldnt cause any issues
mctx, cancel = context.WithTimeout(ctx, time.Second)
defer cancel()
if err := p.Pin(mctx, a, true); err != nil {
t.Fatal(err)
}
}
......@@ -60,11 +60,6 @@ test_expect_failure "ipfs repo gc fully reverse ipfs add" '
'
test_expect_success "file no longer pinned" '
# we expect the welcome files and gw assets to show up here
echo "$HASH_WELCOME_DOCS" >expected2 &&
ipfs refs -r "$HASH_WELCOME_DOCS" >>expected2 &&
EMPTY_DIR=QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn &&
echo "$EMPTY_DIR" >>expected2 &&
ipfs pin ls --type=recursive --quiet >actual2 &&
test_expect_code 1 grep $HASH actual2
'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论