Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
e3a6fbfd
Commit
e3a6fbfd
authored
Jan 25, 2012
by
JINMEI Tatuya
Browse files
[1571] added a test for DS lookup. It currently fails.
parent
54928776
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/tests/memory_datasrc_unittest.cc
View file @
e3a6fbfd
...
...
@@ -291,6 +291,8 @@ public:
{
"example.org. 300 IN DNAME example.com."
,
&
rr_dname_apex_
},
{
"child.example.org. 300 IN NS ns.child.example.org."
,
&
rr_child_ns_
},
{
"child.example.org. 300 IN DS 12345 5 1 DEADBEEF"
,
&
rr_child_ds_
},
{
"ns.child.example.org. 300 IN A 192.0.2.153"
,
&
rr_child_glue_
},
{
"grand.child.example.org. 300 IN NS ns.grand.child.example.org."
,
...
...
@@ -353,6 +355,7 @@ public:
RRsetPtr
rr_dname_ns_
;
// for mixed DNAME + NS case
RRsetPtr
rr_dname_apex_
;
// for mixed DNAME + NS case in the apex
RRsetPtr
rr_child_ns_
;
// NS of a child domain (for delegation)
RRsetPtr
rr_child_ds_
;
// DS of a child domain (for delegation, auth data)
RRsetPtr
rr_child_glue_
;
// glue RR of the child domain
RRsetPtr
rr_grandchild_ns_
;
// NS below a zone cut (unusual)
RRsetPtr
rr_grandchild_glue_
;
// glue RR below a deeper zone cut
...
...
@@ -656,6 +659,17 @@ TEST_F(InMemoryZoneFinderTest, delegationNS) {
ZoneFinder
::
DELEGATION
,
true
,
rr_child_ns_
);
}
TEST_F
(
InMemoryZoneFinderTest
,
delegationWithDS
)
{
// Similar setup to the previous one, but with DS RR at the delegation
// point.
EXPECT_EQ
(
SUCCESS
,
zone_finder_
.
add
(
rr_ns_
));
EXPECT_EQ
(
SUCCESS
,
zone_finder_
.
add
(
rr_child_ns_
));
EXPECT_EQ
(
SUCCESS
,
zone_finder_
.
add
(
rr_child_ds_
));
findTest
(
Name
(
"child.example.org"
),
RRType
::
DS
(),
ZoneFinder
::
SUCCESS
,
true
,
rr_child_ds_
);
}
TEST_F
(
InMemoryZoneFinderTest
,
findAny
)
{
EXPECT_NO_THROW
(
EXPECT_EQ
(
SUCCESS
,
zone_finder_
.
add
(
rr_a_
)));
EXPECT_NO_THROW
(
EXPECT_EQ
(
SUCCESS
,
zone_finder_
.
add
(
rr_ns_
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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