Parcourir la source

[trac503] Small test cleanup

* Fixed a comment
* Modified condition in MockZone to match the one in MemoryZone.
Michal 'vorner' Vaner il y a 14 ans
Parent
commit
5d03cd4b84
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/bin/auth/tests/query_unittest.cc

+ 2 - 2
src/bin/auth/tests/query_unittest.cc

@@ -166,8 +166,8 @@ MockZone::find(const Name& name, const RRType& type,
             return (FindResult(SUCCESS, found_rrset->second));
         }
 
-        // If not found but the qtype is ANY, return the first RRset
-        if (!found_domain->second.empty() && type == RRType::ANY()) {
+        // If not found but we have a target, fill it with all RRsets here
+        if (!found_domain->second.empty() && target != NULL) {
             for (found_rrset = found_domain->second.begin();
                  found_rrset != found_domain->second.end(); found_rrset++)
             {