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
51580fd1
Commit
51580fd1
authored
Oct 15, 2012
by
Michal 'vorner' Vaner
Browse files
[2207] Tests for the getZoneReloader
parent
c55218e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/tests/memory/zone_table_segment_unittest.cc
View file @
51580fd1
...
...
@@ -13,8 +13,14 @@
// PERFORMANCE OF THIS SOFTWARE.
#include
<datasrc/memory/zone_table_segment.h>
#include
<datasrc/memory/zone_reloader.h>
#include
<gtest/gtest.h>
#include
<boost/scoped_ptr.hpp>
using
boost
::
scoped_ptr
;
using
isc
::
dns
::
Name
;
using
isc
::
dns
::
RRClass
;
using
namespace
isc
::
datasrc
::
memory
;
using
namespace
isc
::
data
;
using
namespace
isc
::
util
;
...
...
@@ -80,4 +86,22 @@ TEST_F(ZoneTableSegmentTest, getMemorySegment) {
EXPECT_TRUE
(
mem_sgmt
.
allMemoryDeallocated
());
}
ZoneData
*
load_action
(
MemorySegment
&
)
{
// The function won't be called, so this is OK
return
(
NULL
);
}
// Test we can get a reloader.
TEST_F
(
ZoneTableSegmentTest
,
getZoneReloader
)
{
scoped_ptr
<
ZoneReloader
>
reloader
(
segment_
->
getZoneReloader
(
load_action
,
Name
(
"example.org"
),
RRClass
::
IN
()));
// We have to get something
EXPECT_NE
(
static_cast
<
void
*>
(
NULL
),
reloader
.
get
());
// And for now, it should be the local reloader
EXPECT_NE
(
static_cast
<
void
*>
(
NULL
),
dynamic_cast
<
ZoneReloaderLocal
*>
(
reloader
.
get
()));
}
}
// anonymous namespace
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