Commit a6ce7e43 authored by Mukund Sivaraman's avatar Mukund Sivaraman

[2535] Split up createSQLite3Client method

parent e17ddc8b
......@@ -81,7 +81,7 @@ addRRset(ZoneUpdaterPtr updater, ConstRRsetPtr rrset) {
createSQLite3Client(RRClass zclass, const Name& zname) {
createSQLite3Client(RRClass zclass, const Name& zname, stringstream& ss) {
// We always begin with an empty template SQLite3 DB file and install
// the zone data from the zone file to ensure both cases have the
// same test data.
......@@ -93,7 +93,6 @@ createSQLite3Client(RRClass zclass, const Name& zname) {
// Note that neither updater nor SQLite3 accessor checks this condition,
// so this should succeed.
ZoneUpdaterPtr updater = client->getUpdater(zname, false);
stringstream ss(" 3600 IN A");
masterLoad(ss, Name::ROOT_NAME(), zclass,
boost::bind(addRRset, updater, _1));
......@@ -101,6 +100,12 @@ createSQLite3Client(RRClass zclass, const Name& zname) {
return (client);
createSQLite3ClientWithNS(RRClass zclass, const Name& zname) {
stringstream ss(" 3600 IN A");
return (createSQLite3Client(zclass, zname, ss));
// The test class. Its parameterized so we can share the test scnearios
// for any concrete data source implementaitons.
class ZoneFinderContextTest :
......@@ -134,7 +139,7 @@ protected:
// We test the in-memory and SQLite3 data source implementations.
INSTANTIATE_TEST_CASE_P(, ZoneFinderContextTest,
TEST_P(ZoneFinderContextTest, getAdditionalAuthNS) {
ZoneFinderContextPtr ctx = finder_->find(qzone_, RRType::NS());
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