diff options
author | 2018-06-02 19:48:39 +0100 | |
---|---|---|
committer | 2018-06-02 11:48:39 -0700 | |
commit | 22c0b30d5f7468c2477291419bee3e88dfba490c (patch) | |
tree | 1454e8de2c457fcc649a7712815a6a980526ee6b /plugin/dnssec | |
parent | 3994d3a5a704aab10aa0e52fac8d60ac872ecaad (diff) | |
download | coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.tar.gz coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.tar.zst coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.zip |
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.
Diffstat (limited to 'plugin/dnssec')
-rw-r--r-- | plugin/dnssec/black_lies_test.go | 6 | ||||
-rw-r--r-- | plugin/dnssec/handler_test.go | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugin/dnssec/black_lies_test.go b/plugin/dnssec/black_lies_test.go index b704d67e9..a9a29029e 100644 --- a/plugin/dnssec/black_lies_test.go +++ b/plugin/dnssec/black_lies_test.go @@ -51,11 +51,11 @@ func TestBlackLiesNoError(t *testing.T) { m = d.Sign(state, time.Now().UTC(), server) if m.Rcode != dns.RcodeSuccess { - t.Errorf("expected rcode %d, got %d", dns.RcodeSuccess, m.Rcode) + t.Errorf("Expected rcode %d, got %d", dns.RcodeSuccess, m.Rcode) } if len(m.Answer) != 2 { - t.Errorf("answer section should have 2 RRs") + t.Errorf("Answer section should have 2 RRs") } sig, txt := false, false for _, rr := range m.Answer { @@ -67,7 +67,7 @@ func TestBlackLiesNoError(t *testing.T) { } } if !sig || !txt { - t.Errorf("expected RRSIG and TXT in answer section") + t.Errorf("Expected RRSIG and TXT in answer section") } } diff --git a/plugin/dnssec/handler_test.go b/plugin/dnssec/handler_test.go index d2d566af9..a1c35c635 100644 --- a/plugin/dnssec/handler_test.go +++ b/plugin/dnssec/handler_test.go @@ -118,7 +118,7 @@ func TestLookupZone(t *testing.T) { rec := dnstest.NewRecorder(&test.ResponseWriter{}) _, err := dh.ServeDNS(ctx, rec, m) if err != nil { - t.Errorf("expected no error, got %v\n", err) + t.Errorf("Expected no error, got %v\n", err) return } @@ -141,7 +141,7 @@ func TestLookupDNSKEY(t *testing.T) { rec := dnstest.NewRecorder(&test.ResponseWriter{}) _, err := dh.ServeDNS(ctx, rec, m) if err != nil { - t.Errorf("expected no error, got %v\n", err) + t.Errorf("Expected no error, got %v\n", err) return } @@ -157,7 +157,7 @@ func TestLookupDNSKEY(t *testing.T) { if n, ok := rr.(*dns.NSEC); ok { for i := range n.TypeBitMap { if n.TypeBitMap[i] == tc.Qtype { - t.Errorf("bitmap contains qtype: %d", tc.Qtype) + t.Errorf("Bitmap contains qtype: %d", tc.Qtype) } } } |