Commit d323f32b authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #8 from libp2p/feat/go-vet

fix go vet issues and add go vet to CI scripts
parents 02dc9400 49aab9a2
......@@ -11,6 +11,7 @@ install: true
script:
- make deps
- go vet
- go test ./...
cache:
......@@ -18,4 +19,4 @@ cache:
- $GOPATH/src/gx
notifications:
email: false
\ No newline at end of file
email: false
......@@ -323,7 +323,7 @@ func TestBootstrap(t *testing.T) {
stop := make(chan struct{})
go func() {
for {
t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other %d", nDHTs)
ctxT, _ := context.WithTimeout(ctx, 5*time.Second)
bootstrap(t, ctxT, dhts)
......@@ -392,7 +392,7 @@ func TestPeriodicBootstrap(t *testing.T) {
}
go amplify(signal, allSignals)
t.Logf("dhts are not connected.", nDHTs)
t.Logf("dhts are not connected. %d", nDHTs)
for _, dht := range dhts {
rtlen := dht.routingTable.Size()
if rtlen > 0 {
......@@ -404,7 +404,7 @@ func TestPeriodicBootstrap(t *testing.T) {
connect(t, ctx, dhts[i], dhts[(i+1)%len(dhts)])
}
t.Logf("DHTs are now connected to 1-2 others.", nDHTs)
t.Logf("DHTs are now connected to 1-2 others. %d", nDHTs)
for _, dht := range dhts {
rtlen := dht.routingTable.Size()
if rtlen > 2 {
......@@ -416,7 +416,7 @@ func TestPeriodicBootstrap(t *testing.T) {
printRoutingTables(dhts)
}
t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other. %d", nDHTs)
signal <- time.Now()
// this is async, and we dont know when it's finished with one cycle, so keep checking
......@@ -448,7 +448,7 @@ func TestProvidesMany(t *testing.T) {
}
<-time.After(100 * time.Millisecond)
t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other. %d", nDHTs)
ctxT, _ := context.WithTimeout(ctx, 20*time.Second)
bootstrap(t, ctxT, dhts)
......
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