Commit 70a53e25 authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

Fix presubmit (#1850)

Uppercase these test cases as well.
parent 22c0b30d
...@@ -75,13 +75,13 @@ func TestRequestScrubAnswer(t *testing.T) { ...@@ -75,13 +75,13 @@ func TestRequestScrubAnswer(t *testing.T) {
_, got := req.Scrub(reply) _, got := req.Scrub(reply)
if want := ScrubAnswer; want != got { if want := ScrubAnswer; want != got {
t.Errorf("want scrub result %d, got %d", want, got) t.Errorf("Want scrub result %d, got %d", want, got)
} }
if want, got := req.Size(), reply.Len(); want < got { if want, got := req.Size(), reply.Len(); want < got {
t.Errorf("want scrub to reduce message length below %d bytes, got %d bytes", want, got) t.Errorf("Want scrub to reduce message length below %d bytes, got %d bytes", want, got)
} }
if !reply.Truncated { if !reply.Truncated {
t.Errorf("want scrub to set truncated bit") t.Errorf("Want scrub to set truncated bit")
} }
} }
...@@ -99,13 +99,13 @@ func TestRequestScrubExtra(t *testing.T) { ...@@ -99,13 +99,13 @@ func TestRequestScrubExtra(t *testing.T) {
_, got := req.Scrub(reply) _, got := req.Scrub(reply)
if want := ScrubExtra; want != got { if want := ScrubExtra; want != got {
t.Errorf("want scrub result %d, got %d", want, got) t.Errorf("Want scrub result %d, got %d", want, got)
} }
if want, got := req.Size(), reply.Len(); want < got { if want, got := req.Size(), reply.Len(); want < got {
t.Errorf("want scrub to reduce message length below %d bytes, got %d bytes", want, got) t.Errorf("Want scrub to reduce message length below %d bytes, got %d bytes", want, got)
} }
if reply.Truncated { if reply.Truncated {
t.Errorf("want scrub to not set truncated bit") t.Errorf("Want scrub to not set truncated bit")
} }
} }
...@@ -124,13 +124,13 @@ func TestRequestScrubExtraEdns0(t *testing.T) { ...@@ -124,13 +124,13 @@ func TestRequestScrubExtraEdns0(t *testing.T) {
_, got := req.Scrub(reply) _, got := req.Scrub(reply)
if want := ScrubExtra; want != got { if want := ScrubExtra; want != got {
t.Errorf("want scrub result %d, got %d", want, got) t.Errorf("Want scrub result %d, got %d", want, got)
} }
if want, got := req.Size(), reply.Len(); want < got { if want, got := req.Size(), reply.Len(); want < got {
t.Errorf("want scrub to reduce message length below %d bytes, got %d bytes", want, got) t.Errorf("Want scrub to reduce message length below %d bytes, got %d bytes", want, got)
} }
if reply.Truncated { if reply.Truncated {
t.Errorf("want scrub to not set truncated bit") t.Errorf("Want scrub to not set truncated bit")
} }
opt := reply.Extra[len(reply.Extra)-1] opt := reply.Extra[len(reply.Extra)-1]
if opt.Header().Rrtype != dns.TypeOPT { if opt.Header().Rrtype != dns.TypeOPT {
...@@ -152,10 +152,10 @@ func TestRequestScrubAnswerExact(t *testing.T) { ...@@ -152,10 +152,10 @@ func TestRequestScrubAnswerExact(t *testing.T) {
_, got := req.Scrub(reply) _, got := req.Scrub(reply)
if want := ScrubAnswer; want != got { if want := ScrubAnswer; want != got {
t.Errorf("want scrub result %d, got %d", want, got) t.Errorf("Want scrub result %d, got %d", want, got)
} }
if want, got := req.Size(), reply.Len(); want < got { if want, got := req.Size(), reply.Len(); want < got {
t.Errorf("want scrub to reduce message length below %d bytes, got %d bytes", want, got) t.Errorf("Want scrub to reduce message length below %d bytes, got %d bytes", want, got)
} }
} }
...@@ -166,17 +166,17 @@ func TestRequestMatch(t *testing.T) { ...@@ -166,17 +166,17 @@ func TestRequestMatch(t *testing.T) {
reply.SetQuestion("example.com.", dns.TypeMX) reply.SetQuestion("example.com.", dns.TypeMX)
if b := st.Match(reply); b { if b := st.Match(reply); b {
t.Errorf("failed to match %s %d, got %t, expected %t", "example.com.", dns.TypeMX, b, false) t.Errorf("Failed to match %s %d, got %t, expected %t", "example.com.", dns.TypeMX, b, false)
} }
reply.SetQuestion("example.com.", dns.TypeA) reply.SetQuestion("example.com.", dns.TypeA)
if b := st.Match(reply); !b { if b := st.Match(reply); !b {
t.Errorf("failed to match %s %d, got %t, expected %t", "example.com.", dns.TypeA, b, true) t.Errorf("Failed to match %s %d, got %t, expected %t", "example.com.", dns.TypeA, b, true)
} }
reply.SetQuestion("example.org.", dns.TypeA) reply.SetQuestion("example.org.", dns.TypeA)
if b := st.Match(reply); b { if b := st.Match(reply); b {
t.Errorf("failed to match %s %d, got %t, expected %t", "example.org.", dns.TypeA, b, false) t.Errorf("Failed to match %s %d, got %t, expected %t", "example.org.", dns.TypeA, b, false)
} }
} }
......
...@@ -52,7 +52,7 @@ func TestLookupBalanceRewriteCacheDnssec(t *testing.T) { ...@@ -52,7 +52,7 @@ func TestLookupBalanceRewriteCacheDnssec(t *testing.T) {
} }
} }
if sig == 0 { if sig == 0 {
t.Errorf("expected RRSIGs, got none") t.Errorf("Expected RRSIGs, got none")
t.Logf("%v\n", res) t.Logf("%v\n", res)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment