@cryptotaxi247 / kubo / commits / a5f983293

gofmt generated assets

The generated file went through some changes because of differing go-bindata versions. License: MIT Signed-off-by: Tommi Virtanen <tv@eagain.net>

Tommi Virtanen committed Jul 15, 2015 at 08:36 UTC a5f983293733a67ec5388d16799e3580a0e5ae20
2 files changed +2 -48
pin/pin_test.go
+2 -43
@@ -197,18 +197,14 @@ func TestPinRecursiveFail(t *testing.T) {
197 ctx := context.Background()
198 dstore := dssync.MutexWrap(ds.NewMapDatastore())
199 bstore := blockstore.NewBlockstore(dstore)
200 - bserv, err := bs.New(bstore, offline.Exchange(bstore))
201 - if err != nil {
202 - t.Fatal(err)
203 - }
204 -
200 + bserv := bs.New(bstore, offline.Exchange(bstore))
201 dserv := mdag.NewDAGService(bserv)
202
203 p := NewPinner(dstore, dserv)
204
205 a, _ := randNode()
206 b, _ := randNode()
211 - err = a.AddNodeLinkClean("child", b)
207 + err := a.AddNodeLinkClean("child", b)
208 if err != nil {
209 t.Fatal(err)
210 }
@@ -232,40 +228,3 @@ func TestPinRecursiveFail(t *testing.T) {
228 t.Fatal(err)
229 }
230 }
235 -
236 -func TestPinRecursiveFail(t *testing.T) {
237 - ctx := context.Background()
238 - dstore := dssync.MutexWrap(ds.NewMapDatastore())
239 - bstore := blockstore.NewBlockstore(dstore)
240 - bserv := bs.New(bstore, offline.Exchange(bstore))
241 -
242 - dserv := mdag.NewDAGService(bserv)
243 -
244 - p := NewPinner(dstore, dserv)
245 -
246 - a, _ := randNode()
247 - b, _ := randNode()
248 - err := a.AddNodeLinkClean("child", b)
249 - if err != nil {
250 - t.Fatal(err)
251 - }
252 -
253 - // Note: this isnt a time based test, we expect the pin to fail
254 - mctx, cancel := context.WithTimeout(ctx, time.Millisecond)
255 - defer cancel()
256 - err = p.Pin(mctx, a, true)
257 - if err == nil {
258 - t.Fatal("should have failed to pin here")
259 - }
260 -
261 - if _, err := dserv.Add(b); err != nil {
262 - t.Fatal(err)
263 - }
264 -
265 - // this one is time based... but shouldnt cause any issues
266 - mctx, cancel = context.WithTimeout(ctx, time.Second)
267 - defer cancel()
268 - if err := p.Pin(mctx, a, true); err != nil {
269 - t.Fatal(err)
270 - }
271 -}
test/sharness/t0080-repo.sh
-5
@@ -60,11 +60,6 @@ test_expect_failure "ipfs repo gc fully reverse ipfs add" '
60 '
61
62 test_expect_success "file no longer pinned" '
63 - # we expect the welcome files and gw assets to show up here
64 - echo "$HASH_WELCOME_DOCS" >expected2 &&
65 - ipfs refs -r "$HASH_WELCOME_DOCS" >>expected2 &&
66 - EMPTY_DIR=QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn &&
67 - echo "$EMPTY_DIR" >>expected2 &&
63 ipfs pin ls --type=recursive --quiet >actual2 &&
64 test_expect_code 1 grep $HASH actual2
65 '