Parcourir la source

[5122] Better error handling in unit-test

Tomek Mrugalski il y a 8 ans
Parent
commit
0e4b31cdd3
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/bin/dhcp6/tests/config_parser_unittest.cc

+ 2 - 2
src/bin/dhcp6/tests/config_parser_unittest.cc

@@ -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);