aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/response
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-06-02 19:48:39 +0100
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2018-06-02 11:48:39 -0700
commit22c0b30d5f7468c2477291419bee3e88dfba490c (patch)
tree1454e8de2c457fcc649a7712815a6a980526ee6b /plugin/pkg/response
parent3994d3a5a704aab10aa0e52fac8d60ac872ecaad (diff)
downloadcoredns-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/pkg/response')
-rw-r--r--plugin/pkg/response/typify_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/pkg/response/typify_test.go b/plugin/pkg/response/typify_test.go
index faeaf3579..6be9aa8ff 100644
--- a/plugin/pkg/response/typify_test.go
+++ b/plugin/pkg/response/typify_test.go
@@ -14,7 +14,7 @@ func TestTypifyNilMsg(t *testing.T) {
ty, _ := Typify(m, time.Now().UTC())
if ty != OtherError {
- t.Errorf("message wrongly typified, expected OtherError, got %s", ty)
+ t.Errorf("Message wrongly typified, expected OtherError, got %s", ty)
}
}
@@ -22,7 +22,7 @@ func TestTypifyDelegation(t *testing.T) {
m := delegationMsg()
mt, _ := Typify(m, time.Now().UTC())
if mt != Delegation {
- t.Errorf("message is wrongly typified, expected Delegation, got %s", mt)
+ t.Errorf("Message is wrongly typified, expected Delegation, got %s", mt)
}
}
@@ -32,19 +32,19 @@ func TestTypifyRRSIG(t *testing.T) {
m := delegationMsgRRSIGOK()
if mt, _ := Typify(m, utc); mt != Delegation {
- t.Errorf("message is wrongly typified, expected Delegation, got %s", mt)
+ t.Errorf("Message is wrongly typified, expected Delegation, got %s", mt)
}
// Still a Delegation because EDNS0 OPT DO bool is not set, so we won't check the sigs.
m = delegationMsgRRSIGFail()
if mt, _ := Typify(m, utc); mt != Delegation {
- t.Errorf("message is wrongly typified, expected Delegation, got %s", mt)
+ t.Errorf("Message is wrongly typified, expected Delegation, got %s", mt)
}
m = delegationMsgRRSIGFail()
m = addOpt(m)
if mt, _ := Typify(m, utc); mt != OtherError {
- t.Errorf("message is wrongly typified, expected OtherError, got %s", mt)
+ t.Errorf("Message is wrongly typified, expected OtherError, got %s", mt)
}
}