Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
70a53e25
Commit
70a53e25
authored
Jun 02, 2018
by
Miek Gieben
Committed by
GitHub
Jun 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix presubmit (#1850)
Uppercase these test cases as well.
parent
22c0b30d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
request/request_test.go
request/request_test.go
+14
-14
test/plugin_dnssec_test.go
test/plugin_dnssec_test.go
+1
-1
No files found.
request/request_test.go
View file @
70a53e25
...
...
@@ -75,13 +75,13 @@ func TestRequestScrubAnswer(t *testing.T) {
_
,
got
:=
req
.
Scrub
(
reply
)
if
want
:=
ScrubAnswer
;
want
!=
got
{
t
.
Errorf
(
"
w
ant scrub result %d, got %d"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub result %d, got %d"
,
want
,
got
)
}
if
want
,
got
:=
req
.
Size
(),
reply
.
Len
();
want
<
got
{
t
.
Errorf
(
"
w
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
}
if
!
reply
.
Truncated
{
t
.
Errorf
(
"
w
ant scrub to set truncated bit"
)
t
.
Errorf
(
"
W
ant scrub to set truncated bit"
)
}
}
...
...
@@ -99,13 +99,13 @@ func TestRequestScrubExtra(t *testing.T) {
_
,
got
:=
req
.
Scrub
(
reply
)
if
want
:=
ScrubExtra
;
want
!=
got
{
t
.
Errorf
(
"
w
ant scrub result %d, got %d"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub result %d, got %d"
,
want
,
got
)
}
if
want
,
got
:=
req
.
Size
(),
reply
.
Len
();
want
<
got
{
t
.
Errorf
(
"
w
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
}
if
reply
.
Truncated
{
t
.
Errorf
(
"
w
ant scrub to not set truncated bit"
)
t
.
Errorf
(
"
W
ant scrub to not set truncated bit"
)
}
}
...
...
@@ -124,13 +124,13 @@ func TestRequestScrubExtraEdns0(t *testing.T) {
_
,
got
:=
req
.
Scrub
(
reply
)
if
want
:=
ScrubExtra
;
want
!=
got
{
t
.
Errorf
(
"
w
ant scrub result %d, got %d"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub result %d, got %d"
,
want
,
got
)
}
if
want
,
got
:=
req
.
Size
(),
reply
.
Len
();
want
<
got
{
t
.
Errorf
(
"
w
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
}
if
reply
.
Truncated
{
t
.
Errorf
(
"
w
ant scrub to not set truncated bit"
)
t
.
Errorf
(
"
W
ant scrub to not set truncated bit"
)
}
opt
:=
reply
.
Extra
[
len
(
reply
.
Extra
)
-
1
]
if
opt
.
Header
()
.
Rrtype
!=
dns
.
TypeOPT
{
...
...
@@ -152,10 +152,10 @@ func TestRequestScrubAnswerExact(t *testing.T) {
_
,
got
:=
req
.
Scrub
(
reply
)
if
want
:=
ScrubAnswer
;
want
!=
got
{
t
.
Errorf
(
"
w
ant scrub result %d, got %d"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub result %d, got %d"
,
want
,
got
)
}
if
want
,
got
:=
req
.
Size
(),
reply
.
Len
();
want
<
got
{
t
.
Errorf
(
"
w
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
t
.
Errorf
(
"
W
ant scrub to reduce message length below %d bytes, got %d bytes"
,
want
,
got
)
}
}
...
...
@@ -166,17 +166,17 @@ func TestRequestMatch(t *testing.T) {
reply
.
SetQuestion
(
"example.com."
,
dns
.
TypeMX
)
if
b
:=
st
.
Match
(
reply
);
b
{
t
.
Errorf
(
"
f
ailed to match %s %d, got %t, expected %t"
,
"example.com."
,
dns
.
TypeMX
,
b
,
false
)
t
.
Errorf
(
"
F
ailed to match %s %d, got %t, expected %t"
,
"example.com."
,
dns
.
TypeMX
,
b
,
false
)
}
reply
.
SetQuestion
(
"example.com."
,
dns
.
TypeA
)
if
b
:=
st
.
Match
(
reply
);
!
b
{
t
.
Errorf
(
"
f
ailed to match %s %d, got %t, expected %t"
,
"example.com."
,
dns
.
TypeA
,
b
,
true
)
t
.
Errorf
(
"
F
ailed to match %s %d, got %t, expected %t"
,
"example.com."
,
dns
.
TypeA
,
b
,
true
)
}
reply
.
SetQuestion
(
"example.org."
,
dns
.
TypeA
)
if
b
:=
st
.
Match
(
reply
);
b
{
t
.
Errorf
(
"
f
ailed to match %s %d, got %t, expected %t"
,
"example.org."
,
dns
.
TypeA
,
b
,
false
)
t
.
Errorf
(
"
F
ailed to match %s %d, got %t, expected %t"
,
"example.org."
,
dns
.
TypeA
,
b
,
false
)
}
}
...
...
test/plugin_dnssec_test.go
View file @
70a53e25
...
...
@@ -52,7 +52,7 @@ func TestLookupBalanceRewriteCacheDnssec(t *testing.T) {
}
}
if
sig
==
0
{
t
.
Errorf
(
"
e
xpected RRSIGs, got none"
)
t
.
Errorf
(
"
E
xpected RRSIGs, got none"
)
t
.
Logf
(
"%v
\n
"
,
res
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment