Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fefbdfe

Browse files
committedJul 6, 2015
fix nc tests
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent b0fea98 commit fefbdfe

File tree

8 files changed

+99
-8
lines changed

8 files changed

+99
-8
lines changed
 

‎Godeps/Godeps.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Godeps/_workspace/src/github.com/chriscool/go-sleep/.gitignore

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Godeps/_workspace/src/github.com/whyrusleeping/go-multistream/multistream.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Godeps/_workspace/src/github.com/whyrusleeping/go-multistream/multistream_test.go

+78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Godeps/_workspace/src/github.com/whyrusleeping/iptb/main.go

+11-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pin/pin.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package pin
55
import (
66
"fmt"
77
"sync"
8+
"time"
89

910
ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
1011
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
@@ -243,7 +244,9 @@ func LoadPinner(d ds.ThreadSafeDatastore, dserv mdag.DAGService) (Pinner, error)
243244

244245
rootKey := key.Key(rootKeyBytes)
245246

246-
ctx := context.TODO()
247+
ctx, cancel := context.WithTimeout(context.TODO(), time.Second*5)
248+
defer cancel()
249+
247250
root, err := dserv.Get(ctx, rootKey)
248251
if err != nil {
249252
return nil, fmt.Errorf("cannot find pinning root object: %v", err)

‎test/sharness/t0060-daemon.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ test_expect_success "ipfs help output looks good" '
104104
test_expect_success 'transport should be encrypted' '
105105
nc -w 5 localhost 4001 >swarmnc &&
106106
grep -q "AES-256,AES-128" swarmnc &&
107-
test_must_fail grep -q "/ipfs/identify" swarmnc ||
107+
test_must_fail grep -q "/multistream/1.0.0" swarmnc ||
108108
test_fsh cat swarmnc
109109
'
110110

‎test/sharness/t0061-daemon-opts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_expect_success 'api gateway should be unrestricted' '
2929
test_expect_success 'transport should be unencrypted' '
3030
go-sleep 0.5s | nc localhost "$PORT_SWARM" >swarmnc &&
3131
test_must_fail grep -q "AES-256,AES-128" swarmnc &&
32-
grep -q "/ipfs/identify" swarmnc ||
32+
grep -q "/multistream/1.0.0" swarmnc ||
3333
test_fsh cat swarmnc
3434
'
3535

0 commit comments

Comments
 (0)
Please sign in to comment.