]> granicus.if.org Git - pdns/commitdiff
Make the test succeed but print warnings. Once issue #8231 is fixed
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 18 Sep 2019 15:04:45 +0000 (17:04 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 18 Sep 2019 15:06:55 +0000 (17:06 +0200)
these BOOST_WARNs should be changed to BOOST_CHECK.

pdns/recursordist/test-filterpo_cc.cc

index 3f29e1afc894e0ac98431f2b8c619cf7ac3e03d2..e84d31241992fd1d23b7955d69e18ec013ebdc1b 100644 (file)
@@ -256,25 +256,28 @@ BOOST_AUTO_TEST_CASE(test_filter_policies_wildcard_with_enc) {
     BOOST_CHECK(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::Drop);
   }
 
+  // Once fixed the BOOST_WARN should becomes BOOST_CHECK
+  const string m("Please fix issue #8321");
+  
   {
     const DNSName tstName("112.2o7.net.");
     auto matchingPolicy = dfe.getQueryPolicy(tstName, address, std::unordered_map<std::string,bool>());
-    BOOST_CHECK(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None);
-    BOOST_CHECK(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None, m);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction, m);
   }
   
   {
     const DNSName tstName("102.112.2o7.net.");
     auto matchingPolicy = dfe.getQueryPolicy(tstName, address, std::unordered_map<std::string,bool>());
-    BOOST_CHECK(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None);
-    BOOST_CHECK(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None, m);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction, m);
   }
 
   {
     const DNSName tstName("com.112.2o7.net.");
     auto matchingPolicy = dfe.getQueryPolicy(tstName, address, std::unordered_map<std::string,bool>());
-    BOOST_CHECK(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None);
-    BOOST_CHECK(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_type == DNSFilterEngine::PolicyType::None, m);
+    BOOST_WARN_MESSAGE(matchingPolicy.d_kind == DNSFilterEngine::PolicyKind::NoAction, m);
   }
   
   {