|
@@ -12,8 +12,9 @@
|
|
|
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
// PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
-#include "memory_segment_test.h"
|
|
|
-#include "zone_table_segment_test.h"
|
|
|
+#include <datasrc/tests/memory/memory_segment_test.h>
|
|
|
+#include <datasrc/tests/memory/zone_table_segment_test.h>
|
|
|
+#include <datasrc/tests/memory/zone_loader_util.h>
|
|
|
|
|
|
// NOTE: this faked_nsec3 inclusion (and all related code below)
|
|
|
// was ported during #2109 for the convenience of implementing #2218
|
|
@@ -21,7 +22,7 @@
|
|
|
// In #2219 the original is expected to be removed, and this file should
|
|
|
// probably be moved here (and any leftover code not handled in #2218 should
|
|
|
// be cleaned up)
|
|
|
-#include "../../tests/faked_nsec3.h"
|
|
|
+#include <datasrc/tests/faked_nsec3.h>
|
|
|
|
|
|
#include <datasrc/memory/zone_finder.h>
|
|
|
#include <datasrc/memory/zone_data_updater.h>
|
|
@@ -1610,12 +1611,13 @@ TEST_F(InMemoryZoneFinderTest, findOrphanRRSIG) {
|
|
|
// \brief testcase for #2504 (Problem in inmem NSEC denial of existence
|
|
|
// handling)
|
|
|
TEST_F(InMemoryZoneFinderTest, NSECNonExistentTest) {
|
|
|
+ const Name name("example.com.");
|
|
|
shared_ptr<ZoneTableSegment> ztable_segment(
|
|
|
new ZoneTableSegmentTest(class_, mem_sgmt_));
|
|
|
+ loadZoneIntoTable(*ztable_segment, name, class_,
|
|
|
+ TEST_DATA_DIR "/2504-test.zone");
|
|
|
InMemoryClient client(ztable_segment, class_);
|
|
|
- Name name("example.com.");
|
|
|
|
|
|
- client.load(name, TEST_DATA_DIR "/2504-test.zone");
|
|
|
DataSourceClient::FindResult result(client.findZone(name));
|
|
|
|
|
|
// Check for a non-existing name
|
|
@@ -1771,16 +1773,17 @@ TEST_F(InMemoryZoneFinderNSEC3Test, findNSEC3MissingOrigin) {
|
|
|
DefaultNSEC3HashCreator creator;
|
|
|
setNSEC3HashCreator(&creator);
|
|
|
|
|
|
+ const Name name("example.com.");
|
|
|
shared_ptr<ZoneTableSegment> ztable_segment(
|
|
|
new ZoneTableSegmentTest(class_, mem_sgmt_));
|
|
|
+ loadZoneIntoTable(*ztable_segment, name, class_,
|
|
|
+ TEST_DATA_DIR "/2503-test.zone");
|
|
|
InMemoryClient client(ztable_segment, class_);
|
|
|
- Name name("example.com.");
|
|
|
|
|
|
- client.load(name, TEST_DATA_DIR "/2503-test.zone");
|
|
|
DataSourceClient::FindResult result(client.findZone(name));
|
|
|
|
|
|
// Check for a non-existing name
|
|
|
- Name search_name("nonexist.example.com.");
|
|
|
+ const Name search_name("nonexist.example.com.");
|
|
|
ZoneFinder::FindNSEC3Result find_result(
|
|
|
result.zone_finder->findNSEC3(search_name, true));
|
|
|
// findNSEC3() must have completed (not throw or assert). Because
|