Commit 105208c1 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2213] cleanup: removed now-unused functions

this also fixes build failure for some compilers.
parent f4390da9
......@@ -169,81 +169,6 @@ TEST_F(AuthCommandTest, shutdownIncorrectPID) {
EXPECT_EQ(0, rcode_);
}
// A helper function commonly used for the "loadzone" command tests.
// It configures the server with a memory data source containing two
// zones, and checks the zones are correctly loaded.
void
zoneChecks(AuthSrv& server) {
const RRClass rrclass(RRClass::IN());
DataSrcClientsMgr::Holder holder(server.getDataSrcClientsMgr());
EXPECT_EQ(ZoneFinder::SUCCESS,
holder.findClientList(rrclass)->find(Name("ns.test1.example"))
.finder_->find(Name("ns.test1.example"), RRType::A())->code);
EXPECT_EQ(ZoneFinder::NXRRSET,
holder.findClientList(rrclass)->find(Name("ns.test1.example")).
finder_->find(Name("ns.test1.example"), RRType::AAAA())->code);
EXPECT_EQ(ZoneFinder::SUCCESS,
holder.findClientList(rrclass)->find(Name("ns.test2.example")).
finder_->find(Name("ns.test2.example"), RRType::A())->code);
EXPECT_EQ(ZoneFinder::NXRRSET,
holder.findClientList(rrclass)->find(Name("ns.test2.example")).
finder_->find(Name("ns.test2.example"), RRType::AAAA())->code);
}
void
installDataSrcClientLists(AuthSrv& server, ClientListMapPtr lists) {
server.getDataSrcClientsMgr().setDataSrcClientLists(lists);
}
void
configureZones(AuthSrv& server) {
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR "/test1.zone.in "
TEST_DATA_BUILDDIR "/test1.zone.copied"));
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR "/test2.zone.in "
TEST_DATA_BUILDDIR "/test2.zone.copied"));
const ConstElementPtr config(Element::fromJSON("{"
"\"IN\": [{"
" \"type\": \"MasterFiles\","
" \"params\": {"
" \"test1.example\": \"" +
string(TEST_DATA_BUILDDIR "/test1.zone.copied") + "\","
" \"test2.example\": \"" +
string(TEST_DATA_BUILDDIR "/test2.zone.copied") + "\""
" },"
" \"cache-enable\": true"
"}]}"));
installDataSrcClientLists(server, configureDataSource(config));
zoneChecks(server);
}
void
newZoneChecks(AuthSrv& server) {
const RRClass rrclass(RRClass::IN());
DataSrcClientsMgr::Holder holder(server.getDataSrcClientsMgr());
EXPECT_EQ(ZoneFinder::SUCCESS, holder.findClientList(rrclass)->
find(Name("ns.test1.example")).finder_->
find(Name("ns.test1.example"), RRType::A())->code);
// now test1.example should have ns/AAAA
EXPECT_EQ(ZoneFinder::SUCCESS, holder.findClientList(rrclass)->
find(Name("ns.test1.example")).finder_->
find(Name("ns.test1.example"), RRType::AAAA())->code);
// test2.example shouldn't change
EXPECT_EQ(ZoneFinder::SUCCESS, holder.findClientList(rrclass)->
find(Name("ns.test2.example")).finder_->
find(Name("ns.test2.example"), RRType::A())->code);
EXPECT_EQ(ZoneFinder::NXRRSET,
holder.findClientList(rrclass)->
find(Name("ns.test2.example")).finder_->
find(Name("ns.test2.example"), RRType::AAAA())->code);
}
TEST_F(AuthCommandTest, getStats) {
result_ = execAuthServerCommand(server_, "getstats", ConstElementPtr());
parseAnswer(rcode_, result_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment