Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pavel Zhukov
Kea
Commits
af4b2361
Commit
af4b2361
authored
Jan 27, 2011
by
JINMEI Tatuya
Browse files
[trac526] added tests for explicit type CNAME queries. added notes about
points to be considered with chaining.
parent
661ee8d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/tests/query_unittest.cc
View file @
af4b2361
...
...
@@ -420,8 +420,21 @@ TEST_F(QueryTest, CNAME) {
cname_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
explicitCNAME
)
{
// same owner name as the CNAME test but explicitly query for CNAME RR.
// expect the same response as we don't provide a full chain yet.
Query
(
memory_datasrc
,
Name
(
"cname.example.com"
),
RRType
::
CNAME
(),
response
).
process
();
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
1
,
3
,
3
,
cname_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
CNAME_NX_RRSET
)
{
// Leads to www.example.com, it doesn't have TXT
// note: with chaining, what should be expected is not trivial:
// BIND 9 returns the CNAME in answer and SOA in authority, no additional.
// NSD returns the CNAME, NS in authority, A/AAAA for NS in additional.
Query
(
memory_datasrc
,
Name
(
"cname.example.com"
),
RRType
::
TXT
(),
response
).
process
();
...
...
@@ -429,8 +442,22 @@ TEST_F(QueryTest, CNAME_NX_RRSET) {
cname_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
explicitCNAME_NX_RRSET
)
{
// same owner name as the NXRRSET test but explicitly query for CNAME RR.
Query
(
memory_datasrc
,
Name
(
"cname.example.com"
),
RRType
::
CNAME
(),
response
).
process
();
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
1
,
3
,
3
,
cname_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
CNAME_NX_DOMAIN
)
{
// Leads to nxdomain.example.com
// note: with chaining, what should be expected is not trivial:
// BIND 9 returns the CNAME in answer and SOA in authority, no additional,
// RCODE being NXDOMAIN.
// NSD returns the CNAME, NS in authority, A/AAAA for NS in additional,
// RCODE being NOERROR.
Query
(
memory_datasrc
,
Name
(
"cnamenxdom.example.com"
),
RRType
::
A
(),
response
).
process
();
...
...
@@ -438,6 +465,15 @@ TEST_F(QueryTest, CNAME_NX_DOMAIN) {
cname_nxdom_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
explicitCNAME_NX_DOMAIN
)
{
// same owner name as the NXDOMAIN test but explicitly query for CNAME RR.
Query
(
memory_datasrc
,
Name
(
"cnamenxdom.example.com"
),
RRType
::
CNAME
(),
response
).
process
();
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
1
,
3
,
3
,
cname_nxdom_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
CNAME_OUT
)
{
/*
* This leads out of zone. This should have only the CNAME even
...
...
@@ -454,4 +490,13 @@ TEST_F(QueryTest, CNAME_OUT) {
cname_out_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
TEST_F
(
QueryTest
,
explicitCNAME_OUT
)
{
// same owner name as the OUT test but explicitly query for CNAME RR.
Query
(
memory_datasrc
,
Name
(
"cnameout.example.com"
),
RRType
::
CNAME
(),
response
).
process
();
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
1
,
3
,
3
,
cname_out_txt
,
zone_ns_txt
,
ns_addrs_txt
);
}
}
Write
Preview
Supports
Markdown
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