Browse Source

[5122] Better error handling in unit-test

Tomek Mrugalski 8 years ago
parent
commit
0e4b31cdd3
1 changed files with 2 additions and 2 deletions
  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);