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:
Miek Gieben 2018-06-02 19:48:39 +01:00 committed by Yong Tang
parent 3994d3a5a7
commit 22c0b30d5f
19 changed files with 57 additions and 52 deletions

View file

@ -24,7 +24,7 @@ func TestSpoof(t *testing.T) {
qname := rec.Msg.Question[0].Name
if c.pcache.Len() != 0 {
t.Errorf("cached %s, while reply had %s", "example.org.", qname)
t.Errorf("Cached %s, while reply had %s", "example.org.", qname)
}
// qtype
@ -35,7 +35,7 @@ func TestSpoof(t *testing.T) {
qtype := rec.Msg.Question[0].Qtype
if c.pcache.Len() != 0 {
t.Errorf("cached %s type %d, while reply had %d", "example.org.", dns.TypeMX, qtype)
t.Errorf("Cached %s type %d, while reply had %d", "example.org.", dns.TypeMX, qtype)
}
}
@ -51,7 +51,7 @@ func TestResponse(t *testing.T) {
c.ServeDNS(context.TODO(), rec, req)
if c.pcache.Len() != 0 {
t.Errorf("cached %s, while reply had response set to %t", "example.net.", rec.Msg.Response)
t.Errorf("Cached %s, while reply had response set to %t", "example.net.", rec.Msg.Response)
}
}