Commit 2213a12d authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

Scrub: TC bit is always set (#3001)

miekg/dns recently became more aggressive in setting TC; anything that's
chopped of a response results in TC. Amend the tests. Disputable if
these TC checks still add something.
Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent 69a2397b
...@@ -98,8 +98,8 @@ func TestRequestScrubExtra(t *testing.T) { ...@@ -98,8 +98,8 @@ func TestRequestScrubExtra(t *testing.T) {
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 set truncated bit")
} }
} }
...@@ -120,8 +120,8 @@ func TestRequestScrubExtraEdns0(t *testing.T) { ...@@ -120,8 +120,8 @@ func TestRequestScrubExtraEdns0(t *testing.T) {
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 set truncated bit")
} }
} }
...@@ -146,8 +146,8 @@ func TestRequestScrubExtraRegression(t *testing.T) { ...@@ -146,8 +146,8 @@ func TestRequestScrubExtraRegression(t *testing.T) {
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 set truncated bit")
} }
} }
......
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