]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix zone-to-cache test by properly initing trust anchors and dnssec mode 11266/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 1 Feb 2022 06:49:03 +0000 (07:49 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 1 Feb 2022 07:07:40 +0000 (08:07 +0100)
pdns/recursordist/test-rec-zonetocache.cc

index d671c39a16c4f4b8bb8b033aa164fdacc9375f4a..ffec8883bbdd8505ed778930d3d152bb1835e960 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "rec-zonetocache.hh"
 #include "recursor_cache.hh"
+#include "test-syncres_cc.hh"
 
 extern unique_ptr<MemRecursorCache> g_recCache;
 
@@ -96,6 +97,10 @@ static void zonemdTest(const std::string& lines, pdns::ZoneMD::Config mode, pdns
 
 BOOST_AUTO_TEST_CASE(test_zonetocache)
 {
+  std::unique_ptr<SyncRes> sr;
+  initSR(sr, true);
+  setDNSSECValidation(sr, DNSSECMode::ValidateAll);
+
   zonemdTest(zone, pdns::ZoneMD::Config::Ignore, pdns::ZoneMD::Config::Ignore, 17U);
   zonemdTest(zone, pdns::ZoneMD::Config::Validate, pdns::ZoneMD::Config::Ignore, 17U);
   zonemdTest(zone, pdns::ZoneMD::Config::Require, pdns::ZoneMD::Config::Ignore, 0U);