Commit 2bb63900 authored by Steven Allen's avatar Steven Allen

chore: fix lint

parent 3e11d014
...@@ -26,12 +26,18 @@ func TestWriteThroughWorks(t *testing.T) { ...@@ -26,12 +26,18 @@ func TestWriteThroughWorks(t *testing.T) {
block := bgen.Next() block := bgen.Next()
t.Logf("PutCounter: %d", bstore.PutCounter) t.Logf("PutCounter: %d", bstore.PutCounter)
bserv.AddBlock(block) err := bserv.AddBlock(block)
if err != nil {
t.Fatal(err)
}
if bstore.PutCounter != 1 { if bstore.PutCounter != 1 {
t.Fatalf("expected just one Put call, have: %d", bstore.PutCounter) t.Fatalf("expected just one Put call, have: %d", bstore.PutCounter)
} }
bserv.AddBlock(block) err = bserv.AddBlock(block)
if err != nil {
t.Fatal(err)
}
if bstore.PutCounter != 2 { if bstore.PutCounter != 2 {
t.Fatalf("Put should have called again, should be 2 is: %d", bstore.PutCounter) t.Fatalf("Put should have called again, should be 2 is: %d", bstore.PutCounter)
} }
...@@ -52,10 +58,15 @@ func TestLazySessionInitialization(t *testing.T) { ...@@ -52,10 +58,15 @@ func TestLazySessionInitialization(t *testing.T) {
bgen := butil.NewBlockGenerator() bgen := butil.NewBlockGenerator()
block := bgen.Next() block := bgen.Next()
bstore.Put(block) err := bstore.Put(block)
if err != nil {
t.Fatal(err)
}
block2 := bgen.Next() block2 := bgen.Next()
session.HasBlock(block2) err = session.HasBlock(block2)
if err != nil {
t.Fatal(err)
}
bsession := NewSession(ctx, bservSessEx) bsession := NewSession(ctx, bservSessEx)
if bsession.ses != nil { if bsession.ses != nil {
......
...@@ -74,7 +74,10 @@ func TestGetBlocksSequential(t *testing.T) { ...@@ -74,7 +74,10 @@ func TestGetBlocksSequential(t *testing.T) {
var cids []cid.Cid var cids []cid.Cid
for _, o := range objs { for _, o := range objs {
cids = append(cids, o.Cid()) cids = append(cids, o.Cid())
servs[0].AddBlock(o) err := servs[0].AddBlock(o)
if err != nil {
t.Fatal(err)
}
} }
t.Log("one instance at a time, get blocks concurrently") t.Log("one instance at a time, get blocks concurrently")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment