aboutsummaryrefslogtreecommitdiff
path: root/request
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-07-12 12:33:27 +0000
committerGravatar GitHub <noreply@github.com> 2019-07-12 12:33:27 +0000
commit2213a12d21a9a95e2246ebe6bb3e47778f57dae8 (patch)
tree396e9bfbd3a61fe80df6a06f9686ebd395d4af2b /request
parent69a2397bf56c50959a14fe770e82e45a80bf4416 (diff)
downloadcoredns-2213a12d21a9a95e2246ebe6bb3e47778f57dae8.tar.gz
coredns-2213a12d21a9a95e2246ebe6bb3e47778f57dae8.tar.zst
coredns-2213a12d21a9a95e2246ebe6bb3e47778f57dae8.zip
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: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'request')
-rw-r--r--request/request_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/request/request_test.go b/request/request_test.go
index 4411c6a82..a62fc51bf 100644
--- a/request/request_test.go
+++ b/request/request_test.go
@@ -98,8 +98,8 @@ func TestRequestScrubExtra(t *testing.T) {
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)
}
- if reply.Truncated {
- t.Errorf("Want scrub to not set truncated bit")
+ if !reply.Truncated {
+ t.Errorf("Want scrub to set truncated bit")
}
}
@@ -120,8 +120,8 @@ func TestRequestScrubExtraEdns0(t *testing.T) {
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)
}
- if reply.Truncated {
- t.Errorf("Want scrub to not set truncated bit")
+ if !reply.Truncated {
+ t.Errorf("Want scrub to set truncated bit")
}
}
@@ -146,8 +146,8 @@ func TestRequestScrubExtraRegression(t *testing.T) {
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)
}
- if reply.Truncated {
- t.Errorf("Want scrub to not set truncated bit")
+ if !reply.Truncated {
+ t.Errorf("Want scrub to set truncated bit")
}
}