]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5122] Better error handling in unit-test
authorTomek Mrugalski <tomasz@isc.org>
Fri, 27 Jan 2017 14:17:10 +0000 (15:17 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 27 Jan 2017 14:17:10 +0000 (15:17 +0100)
src/bin/dhcp6/tests/config_parser_unittest.cc

index e844014be1bca1144aa61198b536f2ebf60a93c4..8ab355323dbf36a947632c2fc93d97ab61496e44 100644 (file)
@@ -410,10 +410,10 @@ public:
         Subnet6Ptr subnet = CfgMgr::instance().getStagingCfg()->getCfgSubnets6()->
             selectSubnet(subnet_address, classify_);
         if (!subnet) {
-            /// @todo replace toText() with the use of operator <<.
             ADD_FAILURE() << "A subnet for the specified address "
-                          << subnet_address.toText()
+                          << subnet_address
                           << " does not exist in Config Manager";
+            return (OptionDescriptor(false));
         }
         OptionContainerPtr options =
             subnet->getCfgOption()->getAll(DHCP6_OPTION_SPACE);