From: Aki Tuomi Date: Thu, 5 Nov 2015 10:48:18 +0000 (+0200) Subject: Update unit and test suites X-Git-Tag: dnsdist-1.0.0-alpha1~234^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab7a9ecf96eba27d1d4989398220f3711b4f2f7a;p=pdns Update unit and test suites --- diff --git a/modules/remotebackend/regression-tests/test-schema.sql b/modules/remotebackend/regression-tests/test-schema.sql index 5d891ec3d..42cb22b6b 100644 --- a/modules/remotebackend/regression-tests/test-schema.sql +++ b/modules/remotebackend/regression-tests/test-schema.sql @@ -64,23 +64,23 @@ create table tsigkeys ( create unique index namealgoindex on tsigkeys(name, algorithm); -insert into domains (name,type) VALUES('example.com','NATIVE'); -insert into domains (name,type) VALUES('up.example.com','NATIVE'); +insert into domains (name,type) VALUES('example.com.','NATIVE'); +insert into domains (name,type) VALUES('up.example.com.','NATIVE'); -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com", "SOA", "120", "ns1.example.com hostmaster.example.com 2000010101 28800 7200 1209600 120", "", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com", "NS", "120", "ns1.example.com", "", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com", "NS", "120", "ns2.example.com", "", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "outpost.example.com", "A", "120", "192.168.2.1", "outpost", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "outpost.example.com", "AAAA", "120", "fe80::1", "outpost", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "www.example.com", "A", "120", "192.168.2.255", "www", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com", "NS", "120", "ns1.example.com", "up", 0 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com", "NS", "120", "ns2.example.com", "up", 0 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "ns1.example.com", "A", "120", "192.168.2.2", "ns1", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "ns2.example.com", "A", "120", "192.168.2.3", "ns2", 1 FROM domains WHERE name = "example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com", "SOA", "120", "ns1.example.com hostmaster.example.com 2000010101 28800 7200 1209600 120", "", 1 FROM domains WHERE name = "up.example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com", "NS", "120", "ns1.example.com", "", 1 FROM domains WHERE name = "up.example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com", "NS", "120", "ns2.example.com", "", 1 FROM domains WHERE name = "up.example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "jump.up.example.com", "A", "120", "192.168.3.1", "jump", 1 FROM domains WHERE name = "up.example.com"; -insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "jump.up.example.com", "TXT", "120", "a very very long indeed text string that should pass out clean and proper thru the entire chain of powerdns processing", "jump", 1 FROM domains WHERE name = "up.example.com"; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com.", "SOA", "120", "ns1.example.com. hostmaster.example.com. 2000010101 28800 7200 1209600 120", "", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com.", "NS", "120", "ns1.example.com.", "", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "example.com.", "NS", "120", "ns2.example.com.", "", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "outpost.example.com.", "A", "120", "192.168.2.1", "outpost", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "outpost.example.com.", "AAAA", "120", "fe80::1", "outpost", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "www.example.com.", "A", "120", "192.168.2.255", "www", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com.", "NS", "120", "ns1.example.com.", "up", 0 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com.", "NS", "120", "ns2.example.com.", "up", 0 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "ns1.example.com.", "A", "120", "192.168.2.2", "ns1", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "ns2.example.com.", "A", "120", "192.168.2.3", "ns2", 1 FROM domains WHERE name = "example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com.", "SOA", "120", "ns1.example.com. hostmaster.example.com. 2000010101 28800 7200 1209600 120", "", 1 FROM domains WHERE name = "up.example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com.", "NS", "120", "ns1.example.com.", "", 1 FROM domains WHERE name = "up.example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "up.example.com.", "NS", "120", "ns2.example.com.", "", 1 FROM domains WHERE name = "up.example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "jump.up.example.com.", "A", "120", "192.168.3.1", "jump", 1 FROM domains WHERE name = "up.example.com."; +insert into records (domain_id, name, type, ttl, content, ordername, auth) select id as domain_id, "jump.up.example.com.", "TXT", "120", "a very very long indeed text string that should pass out clean and proper thru the entire chain of powerdns processing", "jump", 1 FROM domains WHERE name = "up.example.com."; commit; diff --git a/modules/remotebackend/test-remotebackend.cc b/modules/remotebackend/test-remotebackend.cc index 9e469d80c..bf5e7c9e7 100644 --- a/modules/remotebackend/test-remotebackend.cc +++ b/modules/remotebackend/test-remotebackend.cc @@ -32,20 +32,20 @@ BOOST_AUTO_TEST_SUITE(test_remotebackend_so) BOOST_AUTO_TEST_CASE(test_method_lookup) { BOOST_TEST_MESSAGE("Testing lookup method"); DNSResourceRecord rr; - be->lookup(QType(QType::SOA), DNSName("unit.test")); + be->lookup(QType(QType::SOA), DNSName("unit.test.")); // then try to get() BOOST_CHECK(be->get(rr)); // and this should be TRUE. // then we check rr contains what we expect BOOST_CHECK_EQUAL(rr.qname.toString(), "unit.test."); BOOST_CHECK_MESSAGE(rr.qtype == QType::SOA, "returned qtype was not SOA"); - BOOST_CHECK_EQUAL(rr.content, "ns.unit.test hostmaster.unit.test 1 2 3 4 5 6"); + BOOST_CHECK_EQUAL(rr.content, "ns.unit.test. hostmaster.unit.test. 1 2 3 4 5 6"); BOOST_CHECK_EQUAL(rr.ttl, 300); } BOOST_AUTO_TEST_CASE(test_method_lookup_empty) { BOOST_TEST_MESSAGE("Testing lookup method with empty result"); DNSResourceRecord rr; - be->lookup(QType(QType::SOA), DNSName("empty.unit.test")); + be->lookup(QType(QType::SOA), DNSName("empty.unit.test.")); // then try to get() BOOST_CHECK(!be->get(rr)); // and this should be FALSE } @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(test_method_list) { DNSResourceRecord rr; BOOST_TEST_MESSAGE("Testing list method"); - be->list(DNSName("unit.test"), -1); + be->list(DNSName("unit.test."), -1); while(be->get(rr)) record_count++; BOOST_CHECK_EQUAL(record_count, 5); // number of records our test domain has @@ -70,13 +70,13 @@ BOOST_AUTO_TEST_CASE(test_method_setDomainMetadata) { std::vector meta; meta.push_back("VALUE"); BOOST_TEST_MESSAGE("Testing setDomainMetadata method"); - BOOST_CHECK(be->setDomainMetadata(DNSName("unit.test"),"TEST", meta)); + BOOST_CHECK(be->setDomainMetadata(DNSName("unit.test."),"TEST", meta)); } BOOST_AUTO_TEST_CASE(test_method_getDomainMetadata) { std::vector meta; BOOST_TEST_MESSAGE("Testing getDomainMetadata method"); - be->getDomainMetadata(DNSName("unit.test"),"TEST", meta); + be->getDomainMetadata(DNSName("unit.test."),"TEST", meta); BOOST_CHECK_EQUAL(meta.size(), 1); // in case we got more than one value, which would be unexpected // but not fatal @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(test_method_getDomainMetadata) { BOOST_AUTO_TEST_CASE(test_method_getAllDomainMetadata) { std::map > meta; BOOST_TEST_MESSAGE("Testing getAllDomainMetadata method"); - be->getAllDomainMetadata(DNSName("unit.test"), meta); + be->getAllDomainMetadata(DNSName("unit.test."), meta); BOOST_CHECK_EQUAL(meta.size(), 1); // in case we got more than one value, which would be unexpected // but not fatal @@ -97,15 +97,15 @@ BOOST_AUTO_TEST_CASE(test_method_getAllDomainMetadata) { BOOST_AUTO_TEST_CASE(test_method_addDomainKey) { BOOST_TEST_MESSAGE("Testing addDomainKey method"); - BOOST_CHECK_EQUAL(be->addDomainKey(DNSName("unit.test"),k1), 1); - BOOST_CHECK_EQUAL(be->addDomainKey(DNSName("unit.test"),k2), 2); + BOOST_CHECK_EQUAL(be->addDomainKey(DNSName("unit.test."),k1), 1); + BOOST_CHECK_EQUAL(be->addDomainKey(DNSName("unit.test."),k2), 2); } BOOST_AUTO_TEST_CASE(test_method_getDomainKeys) { std::vector keys; BOOST_TEST_MESSAGE("Testing getDomainKeys method"); // we expect to get two keys - be->getDomainKeys(DNSName("unit.test"),0,keys); + be->getDomainKeys(DNSName("unit.test."),0,keys); BOOST_CHECK_EQUAL(keys.size(), 2); // in case we got more than 2 keys, which would be unexpected // but not fatal @@ -122,17 +122,17 @@ BOOST_AUTO_TEST_CASE(test_method_getDomainKeys) { BOOST_AUTO_TEST_CASE(test_method_deactivateDomainKey) { BOOST_TEST_MESSAGE("Testing deactivateDomainKey method"); - BOOST_CHECK(be->deactivateDomainKey(DNSName("unit.test"),1)); + BOOST_CHECK(be->deactivateDomainKey(DNSName("unit.test."),1)); } BOOST_AUTO_TEST_CASE(test_method_activateDomainKey) { BOOST_TEST_MESSAGE("Testing activateDomainKey method"); - BOOST_CHECK(be->activateDomainKey(DNSName("unit.test"),1)); + BOOST_CHECK(be->activateDomainKey(DNSName("unit.test."),1)); } BOOST_AUTO_TEST_CASE(test_method_removeDomainKey) { - BOOST_CHECK(be->removeDomainKey(DNSName("unit.test"),2)); - BOOST_CHECK(be->removeDomainKey(DNSName("unit.test"),1)); + BOOST_CHECK(be->removeDomainKey(DNSName("unit.test."),2)); + BOOST_CHECK(be->removeDomainKey(DNSName("unit.test."),1)); } BOOST_AUTO_TEST_CASE(test_method_getBeforeAndAfterNamesAbsolute) { @@ -140,23 +140,23 @@ BOOST_AUTO_TEST_CASE(test_method_getBeforeAndAfterNamesAbsolute) { std::string before,after; BOOST_TEST_MESSAGE("Testing getBeforeAndAfterNamesAbsolute method"); - be->getBeforeAndAfterNamesAbsolute(-1, "middle.unit.test", unhashed, before, after); + be->getBeforeAndAfterNamesAbsolute(-1, "middle.unit.test.", unhashed, before, after); BOOST_CHECK_EQUAL(unhashed.toString(), "middle."); - BOOST_CHECK_EQUAL(before, "begin"); - BOOST_CHECK_EQUAL(after, "stop"); + BOOST_CHECK_EQUAL(before, "begin."); + BOOST_CHECK_EQUAL(after, "stop."); } BOOST_AUTO_TEST_CASE(test_method_setTSIGKey) { std::string algorithm, content; BOOST_TEST_MESSAGE("Testing setTSIGKey method"); - BOOST_CHECK_MESSAGE(be->setTSIGKey(DNSName("unit.test"),DNSName("hmac-md5"),"kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys="), "did not return true"); + BOOST_CHECK_MESSAGE(be->setTSIGKey(DNSName("unit.test."),DNSName("hmac-md5."),"kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys="), "did not return true"); } BOOST_AUTO_TEST_CASE(test_method_getTSIGKey) { DNSName algorithm; std::string content; BOOST_TEST_MESSAGE("Testing getTSIGKey method"); - be->getTSIGKey(DNSName("unit.test"),&algorithm,&content); + be->getTSIGKey(DNSName("unit.test."),&algorithm,&content); BOOST_CHECK_EQUAL(algorithm.toString(), "hmac-md5."); BOOST_CHECK_EQUAL(content, "kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys="); } @@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE(test_method_getTSIGKey) { BOOST_AUTO_TEST_CASE(test_method_deleteTSIGKey) { std::string algorithm, content; BOOST_TEST_MESSAGE("Testing deleteTSIGKey method"); - BOOST_CHECK_MESSAGE(be->deleteTSIGKey(DNSName("unit.test")), "did not return true"); + BOOST_CHECK_MESSAGE(be->deleteTSIGKey(DNSName("unit.test.")), "did not return true"); } BOOST_AUTO_TEST_CASE(test_method_getTSIGKeys) { @@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE(test_method_setNotified) { BOOST_AUTO_TEST_CASE(test_method_getDomainInfo) { DomainInfo di; BOOST_TEST_MESSAGE("Testing getDomainInfo method"); - be->getDomainInfo(DNSName("unit.test"), di); + be->getDomainInfo(DNSName("unit.test."), di); BOOST_CHECK_EQUAL(di.zone.toString(), "unit.test."); BOOST_CHECK_EQUAL(di.serial, 2); BOOST_CHECK_EQUAL(di.notified_serial, 2); @@ -198,8 +198,8 @@ BOOST_AUTO_TEST_CASE(test_method_getDomainInfo) { BOOST_AUTO_TEST_CASE(test_method_isMaster) { BOOST_TEST_MESSAGE("Testing isMaster method"); - BOOST_CHECK(be->isMaster(DNSName("ns1.unit.test"), "10.0.0.1")); - BOOST_CHECK(!be->isMaster(DNSName("ns2.unit.test"), "10.0.0.2")); + BOOST_CHECK(be->isMaster(DNSName("ns1.unit.test."), "10.0.0.1")); + BOOST_CHECK(!be->isMaster(DNSName("ns2.unit.test."), "10.0.0.2")); } BOOST_AUTO_TEST_CASE(test_method_superMasterBackend) { @@ -208,20 +208,20 @@ BOOST_AUTO_TEST_CASE(test_method_superMasterBackend) { DNSBackend *dbd; BOOST_TEST_MESSAGE("Testing superMasterBackend method"); - rr.qname = DNSName("example.com"); + rr.qname = DNSName("example.com."); rr.qtype = QType::NS; rr.qclass = QClass::IN; rr.ttl = 300; - rr.content = "ns1.example.com"; + rr.content = "ns1.example.com."; nsset.push_back(rr); - rr.qname = DNSName("example.com"); + rr.qname = DNSName("example.com."); rr.qtype = QType::NS; rr.qclass = QClass::IN; rr.ttl = 300; - rr.content = "ns2.example.com"; + rr.content = "ns2.example.com."; nsset.push_back(rr); - BOOST_CHECK(be->superMasterBackend("10.0.0.1", DNSName("example.com"), nsset, NULL, NULL, &dbd)); + BOOST_CHECK(be->superMasterBackend("10.0.0.1", DNSName("example.com."), nsset, NULL, NULL, &dbd)); // let's see what we got BOOST_CHECK_EQUAL(dbd, be); @@ -229,20 +229,20 @@ BOOST_AUTO_TEST_CASE(test_method_superMasterBackend) { BOOST_AUTO_TEST_CASE(test_method_createSlaveDomain) { BOOST_TEST_MESSAGE("Testing createSlaveDomain method"); - BOOST_CHECK(be->createSlaveDomain("10.0.0.1", DNSName("pirate.unit.test"), "", "")); + BOOST_CHECK(be->createSlaveDomain("10.0.0.1", DNSName("pirate.unit.test."), "", "")); } BOOST_AUTO_TEST_CASE(test_method_feedRecord) { DNSResourceRecord rr; BOOST_TEST_MESSAGE("Testing feedRecord method"); - be->startTransaction(DNSName("example.com"),2); - rr.qname = DNSName("example.com"); + be->startTransaction(DNSName("example.com."),2); + rr.qname = DNSName("example.com."); rr.qtype = QType::SOA; rr.qclass = QClass::IN; rr.ttl = 300; - rr.content = "ns1.example.com hostmaster.example.com 2013013441 7200 3600 1209600 300"; + rr.content = "ns1.example.com. hostmaster.example.com. 2013013441 7200 3600 1209600 300"; BOOST_CHECK(be->feedRecord(rr, NULL)); - rr.qname = DNSName("replace.example.com"); + rr.qname = DNSName("replace.example.com."); rr.qtype = QType::A; rr.qclass = QClass::IN; rr.ttl = 300; @@ -252,23 +252,23 @@ BOOST_AUTO_TEST_CASE(test_method_feedRecord) { } BOOST_AUTO_TEST_CASE(test_method_replaceRRSet) { - be->startTransaction(DNSName("example.com"),2); + be->startTransaction(DNSName("example.com."),2); DNSResourceRecord rr; std::vector rrset; BOOST_TEST_MESSAGE("Testing replaceRRSet method"); - rr.qname = DNSName("replace.example.com"); + rr.qname = DNSName("replace.example.com."); rr.qtype = QType::A; rr.qclass = QClass::IN; rr.ttl = 300; rr.content = "1.1.1.1"; rrset.push_back(rr); - BOOST_CHECK(be->replaceRRSet(2, DNSName("replace.example.com"), QType(QType::A), rrset)); + BOOST_CHECK(be->replaceRRSet(2, DNSName("replace.example.com."), QType(QType::A), rrset)); be->commitTransaction(); } BOOST_AUTO_TEST_CASE(test_method_feedEnts) { BOOST_TEST_MESSAGE("Testing feedEnts method"); - be->startTransaction(DNSName("example.com"),2); + be->startTransaction(DNSName("example.com."),2); map nonterm = boost::assign::map_list_of(DNSName("_udp"), true)(DNSName("_sip._udp"), true); BOOST_CHECK(be->feedEnts(2, nonterm)); be->commitTransaction(); @@ -281,13 +281,13 @@ BOOST_AUTO_TEST_CASE(test_method_feedEnts3) { ns3prc.d_iterations=1; ns3prc.d_salt="\u00aa\u00bb\u00cc\u00dd"; map nonterm = boost::assign::map_list_of(DNSName("_udp"), true)(DNSName("_sip._udp"), true); - BOOST_CHECK(be->feedEnts3(2, DNSName("example.com"), nonterm, ns3prc, 0)); + BOOST_CHECK(be->feedEnts3(2, DNSName("example.com."), nonterm, ns3prc, 0)); be->commitTransaction(); } BOOST_AUTO_TEST_CASE(test_method_abortTransaction) { BOOST_TEST_MESSAGE("Testing abortTransaction method"); - be->startTransaction(DNSName("example.com"),2); + be->startTransaction(DNSName("example.com."),2); BOOST_CHECK(be->abortTransaction()); } @@ -295,8 +295,8 @@ BOOST_AUTO_TEST_CASE(test_method_calculateSOASerial) { SOAData sd; time_t serial; - be->getSOA(DNSName("unit.test"),sd); - BOOST_CHECK(be->calculateSOASerial(DNSName("unit.test"),sd,serial)); + be->getSOA(DNSName("unit.test."),sd); + BOOST_CHECK(be->calculateSOASerial(DNSName("unit.test."),sd,serial)); BOOST_CHECK_EQUAL(serial, 2013060300); } diff --git a/modules/remotebackend/unittest.rb b/modules/remotebackend/unittest.rb index ba14c98ca..004292a36 100644 --- a/modules/remotebackend/unittest.rb +++ b/modules/remotebackend/unittest.rb @@ -8,26 +8,26 @@ $ttl = 300 $notified_serial = 1 $domain = { - "unit.test" => { - "SOA" => ["ns.unit.test hostmaster.unit.test 1 2 3 4 5 6"], - "NS" => ["ns1.unit.test", "ns2.unit.test"], + "unit.test." => { + "SOA" => ["ns.unit.test. hostmaster.unit.test. 1 2 3 4 5 6"], + "NS" => ["ns1.unit.test.", "ns2.unit.test."], }, - "ns1.unit.test" => { + "ns1.unit.test." => { "A" => ["10.0.0.1"] }, - "ns2.unit.test" => { + "ns2.unit.test." => { "A" => ["10.0.0.2"] }, - "empty.unit.test" => {} + "empty.unit.test." => {} } $meta = {} $keys = {} -$tsigkeys = { "test" => {:name => "test", :algorithm => "NULL", :content => "NULL"} } +$tsigkeys = { "test." => {:name => "test.", :algorithm => "NULL.", :content => "NULL"} } -$masters = { :name => "ns1.unit.test", :ip => "10.0.0.1" } +$masters = { :name => "ns1.unit.test.", :ip => "10.0.0.1" } class Handler def initialize @@ -62,7 +62,7 @@ class Handler def do_list(args) ret = [] - if args["zonename"] == "unit.test" + if args["zonename"] == "unit.test." $domain.each do |qname,rdata| rdata.each do |rtype,rc| rc.each do |rd| @@ -140,7 +140,7 @@ class Handler end def do_getbeforeandafternamesabsolute(args) - return [ { :unhashed => "middle", :before => "begin", :after => "stop" } ] if args["qname"] == 'middle.unit.test' + return [ { :unhashed => "middle.", :before => "begin.", :after => "stop." } ] if args["qname"] == 'middle.unit.test.' [false] end @@ -160,10 +160,10 @@ class Handler end def do_getdomaininfo(args) - if args["name"] == "unit.test" + if args["name"] == "unit.test." return [{ :id => 1, - :zone => "unit.test", + :zone => "unit.test.", :masters => ["10.0.0.1"], :notified_serial => $notified_serial, :serial => $notified_serial, @@ -246,7 +246,7 @@ class Handler end def do_calculatesoaserial(args) - return [2013060300] if args["sd"]["qname"] == "unit.test" + return [2013060300] if args["sd"]["qname"] == "unit.test." [false] end diff --git a/regression-tests/backends/remote-master b/regression-tests/backends/remote-master index d654e2009..476be6b8f 100644 --- a/regression-tests/backends/remote-master +++ b/regression-tests/backends/remote-master @@ -93,7 +93,10 @@ EOF $PDNSSEC --config-dir=. --config-name=remote secure-zone example.com $PDNSSEC --config-dir=. --config-name=remote secure-zone up.example.com - ./gsql_feed_ds.pl up.example.com example.com "$PDNSSEC --config-dir=. --config-name=remote" "sqlite3 $testsdir/remote.sqlite3" + ./gsql_feed_ds.pl up.example.com. example.com. "$PDNSSEC --config-dir=. --config-name=remote" "sqlite3 $testsdir/remote.sqlite3" + + # fix dot + sqlite3 $testsdir/remote.sqlite3 "UPDATE records SET name = 'up.example.com.' WHERE name = 'up.example.com'" if [ "$remotesec" = "nsec3" ] then