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
67885575
Commit
67885575
authored
Mar 17, 2022
by
xuweiwei
Committed by
GitHub
Mar 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin/file: add CAA record test case (#5219)
Signed-off-by:
xuweiwei
<
xuweiwei_yewu@cmss.chinamobile.com
>
parent
21fc65bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
plugin/file/lookup_test.go
plugin/file/lookup_test.go
+8
-0
plugin/test/helpers.go
plugin/test/helpers.go
+3
-0
No files found.
plugin/file/lookup_test.go
View file @
67885575
...
@@ -139,6 +139,13 @@ var dnsTestCases = []test.Case{
...
@@ -139,6 +139,13 @@ var dnsTestCases = []test.Case{
},
},
Ns
:
miekAuth
,
Ns
:
miekAuth
,
},
},
{
Qname
:
"caa.miek.nl."
,
Qtype
:
dns
.
TypeCAA
,
Answer
:
[]
dns
.
RR
{
test
.
CAA
(
`caa.miek.nl. 1800 IN CAA 0 issue letsencrypt.org`
),
},
Ns
:
miekAuth
,
},
}
}
const
(
const
(
...
@@ -244,4 +251,5 @@ srv IN SRV 10 10 8080 a.miek.nl.
...
@@ -244,4 +251,5 @@ srv IN SRV 10 10 8080 a.miek.nl.
mx IN MX 10 a.miek.nl.
mx IN MX 10 a.miek.nl.
txt IN TXT "v=spf1 a mx ~all"
txt IN TXT "v=spf1 a mx ~all"
caa IN CAA 0 issue letsencrypt.org
ext-cname IN CNAME example.com.`
ext-cname IN CNAME example.com.`
plugin/test/helpers.go
View file @
67885575
...
@@ -82,6 +82,9 @@ func PTR(rr string) *dns.PTR { r, _ := dns.NewRR(rr); return r.(*dns.PTR) }
...
@@ -82,6 +82,9 @@ func PTR(rr string) *dns.PTR { r, _ := dns.NewRR(rr); return r.(*dns.PTR) }
// TXT returns a TXT record from rr. It panics on errors.
// TXT returns a TXT record from rr. It panics on errors.
func
TXT
(
rr
string
)
*
dns
.
TXT
{
r
,
_
:=
dns
.
NewRR
(
rr
);
return
r
.
(
*
dns
.
TXT
)
}
func
TXT
(
rr
string
)
*
dns
.
TXT
{
r
,
_
:=
dns
.
NewRR
(
rr
);
return
r
.
(
*
dns
.
TXT
)
}
// CAA returns a CAA record from rr. It panics on errors.
func
CAA
(
rr
string
)
*
dns
.
CAA
{
r
,
_
:=
dns
.
NewRR
(
rr
);
return
r
.
(
*
dns
.
CAA
)
}
// HINFO returns a HINFO record from rr. It panics on errors.
// HINFO returns a HINFO record from rr. It panics on errors.
func
HINFO
(
rr
string
)
*
dns
.
HINFO
{
r
,
_
:=
dns
.
NewRR
(
rr
);
return
r
.
(
*
dns
.
HINFO
)
}
func
HINFO
(
rr
string
)
*
dns
.
HINFO
{
r
,
_
:=
dns
.
NewRR
(
rr
);
return
r
.
(
*
dns
.
HINFO
)
}
...
...
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