Skip to content

Commit

Permalink
fix error when make lint
Browse files Browse the repository at this point in the history
```
make lint
networkdb/networkdb_test.go:88:2: should replace t.Error(fmt.Sprintf(...)) with t.Errorf(...)
networkdb/networkdb_test.go:136:2: should replace t.Error(fmt.Sprintf(...)) with t.Errorf(...)
make: *** [lint] Error 1
```

Signed-off-by: Lei Gong <lgong@alauda.io>
  • Loading branch information
Lei Gong authored and robertgzr committed Mar 4, 2019
1 parent ff44f47 commit cf3d5d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions networkdb/networkdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (db *NetworkDB) verifyNodeExistence(t *testing.T, node string, present bool
time.Sleep(50 * time.Millisecond)
}

t.Error(fmt.Sprintf("%v(%v): Node existence verification for node %s failed", db.config.Hostname, db.config.NodeID, node))
t.Errorf("%v(%v): Node existence verification for node %s failed", db.config.Hostname, db.config.NodeID, node)
}

func (db *NetworkDB) verifyNetworkExistence(t *testing.T, node string, id string, present bool) {
Expand Down Expand Up @@ -133,7 +133,7 @@ func (db *NetworkDB) verifyEntryExistence(t *testing.T, tname, nid, key, value s
time.Sleep(50 * time.Millisecond)
}

t.Error(fmt.Sprintf("Entry existence verification test failed for %v(%v)", db.config.Hostname, db.config.NodeID))
t.Errorf("Entry existence verification test failed for %v(%v)", db.config.Hostname, db.config.NodeID)
}

func testWatch(t *testing.T, ch chan events.Event, ev interface{}, tname, nid, key, value string) {
Expand Down

0 comments on commit cf3d5d2

Please sign in to comment.