presubmit: Check errorf as well (#1845)
Uppercase all these test errors as well. And extend the presubmit to check for these in the future. Also do a slightly smarter grep to only get t.<something>. as (because dump regexp) this also grep over non test files.
This commit is contained in:
parent
3994d3a5a7
commit
22c0b30d5f
19 changed files with 57 additions and 52 deletions
|
@ -42,7 +42,7 @@ func (w *writer) Dnstap(e tap.Dnstap) {
|
|||
w.t.Error("Message not expected.")
|
||||
}
|
||||
if !test.MsgEqual(w.queue[0], e.Message) {
|
||||
w.t.Errorf("want: %v, have: %v", w.queue[0], e.Message)
|
||||
w.t.Errorf("Want: %v, have: %v", w.queue[0], e.Message)
|
||||
}
|
||||
w.queue = w.queue[1:]
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestConfig(t *testing.T) {
|
|||
} else if err != nil || conf.target != c.path ||
|
||||
conf.full != c.full || conf.socket != c.socket {
|
||||
|
||||
t.Errorf("expected: %+v\nhave: %+v\nerror: %s\n", c, conf, err)
|
||||
t.Errorf("Expected: %+v\nhave: %+v\nerror: %s\n", c, conf, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue