1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix error when make lint

```
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>
This commit is contained in:
Lei Gong 2018-09-08 21:05:23 +08:00
parent 02bee778e8
commit 1adcfa9aa1

View file

@ -85,7 +85,7 @@ func (db *NetworkDB) verifyNodeExistence(t *testing.T, node string, present bool
time.Sleep(50 * time.Millisecond) 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) { func (db *NetworkDB) verifyNetworkExistence(t *testing.T, node string, id string, present bool) {
@ -133,7 +133,7 @@ func (db *NetworkDB) verifyEntryExistence(t *testing.T, tname, nid, key, value s
time.Sleep(50 * time.Millisecond) 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) { func testWatch(t *testing.T, ch chan events.Event, ev interface{}, tname, nid, key, value string) {