Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit d582f74

Browse files
authored
Merge pull request #52 from ipfs/fix/circleci-badge
fix ci badge and lints
2 parents 10a87bf + 2bb6390 commit d582f74

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go-blockservice
55
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
66
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
77
[![Coverage Status](https://codecov.io/gh/ipfs/go-block-format/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/go-block-format/branch/master)
8-
[![Travis CI](https://travis-ci.com/ipfs/go-blockservice.svg?branch=master)](https://travis-ci.com/ipfs/go-blockservice)
8+
[![Build Status](https://circleci.com/gh/ipfs/go-blockservice.svg?style=svg)](https://circleci.com/gh/ipfs/go-blockservice)
99

1010
> go-blockservice provides a seamless interface to both local and remote storage backends.
1111

blockservice_test.go

+16-5
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ func TestWriteThroughWorks(t *testing.T) {
2626
block := bgen.Next()
2727

2828
t.Logf("PutCounter: %d", bstore.PutCounter)
29-
bserv.AddBlock(block)
29+
err := bserv.AddBlock(block)
30+
if err != nil {
31+
t.Fatal(err)
32+
}
3033
if bstore.PutCounter != 1 {
3134
t.Fatalf("expected just one Put call, have: %d", bstore.PutCounter)
3235
}
3336

34-
bserv.AddBlock(block)
37+
err = bserv.AddBlock(block)
38+
if err != nil {
39+
t.Fatal(err)
40+
}
3541
if bstore.PutCounter != 2 {
3642
t.Fatalf("Put should have called again, should be 2 is: %d", bstore.PutCounter)
3743
}
@@ -52,10 +58,15 @@ func TestLazySessionInitialization(t *testing.T) {
5258
bgen := butil.NewBlockGenerator()
5359

5460
block := bgen.Next()
55-
bstore.Put(block)
56-
61+
err := bstore.Put(block)
62+
if err != nil {
63+
t.Fatal(err)
64+
}
5765
block2 := bgen.Next()
58-
session.HasBlock(block2)
66+
err = session.HasBlock(block2)
67+
if err != nil {
68+
t.Fatal(err)
69+
}
5970

6071
bsession := NewSession(ctx, bservSessEx)
6172
if bsession.ses != nil {

go.sum

+1-6
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ github.com/gxed/hashland/murmur3 v0.0.1 h1:SheiaIt0sda5K+8FLz952/1iWS9zrnKsEJaOJ
4848
github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48=
4949
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
5050
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
51-
github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=
52-
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
5351
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
5452
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
5553
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
@@ -70,8 +68,7 @@ github.com/ipfs/go-cid v0.0.1 h1:GBjWPktLnNyX0JiQCNFpUuUSoMw5KMyqrsejHYlILBE=
7068
github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
7169
github.com/ipfs/go-cid v0.0.2 h1:tuuKaZPU1M6HcejsO3AcYWW8sZ8MTvyxfc4uqB4eFE8=
7270
github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
73-
github.com/ipfs/go-cid v0.0.3 h1:UIAh32wymBpStoe83YCzwVQQ5Oy/H0FdxvUS6DJDzms=
74-
github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
71+
github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M=
7572
github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU=
7673
github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog=
7774
github.com/ipfs/go-datastore v0.0.1 h1:AW/KZCScnBWlSb5JbnEnLKFWXL224LBEh/9KXXOrUms=
@@ -88,8 +85,6 @@ github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjv
8885
github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc=
8986
github.com/ipfs/go-ipfs-blockstore v0.0.1 h1:O9n3PbmTYZoNhkgkEyrXTznbmktIXif62xLX+8dPHzc=
9087
github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08=
91-
github.com/ipfs/go-ipfs-blockstore v0.1.1 h1:+PAFREAlSxLs9IEtrRcnJ/DqWkGlDa+l547WFZnohNw=
92-
github.com/ipfs/go-ipfs-blockstore v0.1.1/go.mod h1:8gZOgIN5e+Xdg2YSGdwTTRbguSVjYyosIDRQCY8E9QM=
9388
github.com/ipfs/go-ipfs-blockstore v0.1.4 h1:2SGI6U1B44aODevza8Rde3+dY30Pb+lbcObe1LETxOQ=
9489
github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ=
9590
github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ=

test/blocks_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ func TestGetBlocksSequential(t *testing.T) {
7474
var cids []cid.Cid
7575
for _, o := range objs {
7676
cids = append(cids, o.Cid())
77-
servs[0].AddBlock(o)
77+
err := servs[0].AddBlock(o)
78+
if err != nil {
79+
t.Fatal(err)
80+
}
7881
}
7982

8083
t.Log("one instance at a time, get blocks concurrently")

0 commit comments

Comments
 (0)