BIND 10 trac2545, updated. 61c303c8f15dce6a985e5d0164a50844b6c64558 [2545] Use CSV format to initialize std option data.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Dec 20 11:52:15 UTC 2012


The branch, trac2545 has been updated
       via  61c303c8f15dce6a985e5d0164a50844b6c64558 (commit)
      from  6eb4014782afae7660dbdc291c315a211e5ceed5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 61c303c8f15dce6a985e5d0164a50844b6c64558
Author: Marcin Siodelski <marcin at isc.org>
Date:   Thu Dec 20 12:52:07 2012 +0100

    [2545] Use CSV format to initialize std option data.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/dhcp6/tests/config_parser_unittest.cc |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc
index abb4ff6..6b8f5da 100644
--- a/src/bin/dhcp6/tests/config_parser_unittest.cc
+++ b/src/bin/dhcp6/tests/config_parser_unittest.cc
@@ -753,8 +753,8 @@ TEST_F(Dhcp6ParserTest, stdOptionData) {
     params["name"] = "OPTION_IA_NA";
     // Option code 3 means OPTION_IA_NA.
     params["code"] = "3";
-    params["data"] = "ABCDEF01 02030405 06070809";
-    params["csv-format"] = "False";
+    params["data"] = "12345, 6789, 1516";
+    params["csv-format"] = "True";
 
     std::string config = createConfigWithOption(params);
     ElementPtr json = Element::fromJSON(config);
@@ -762,6 +762,7 @@ TEST_F(Dhcp6ParserTest, stdOptionData) {
     EXPECT_NO_THROW(x = configureDhcp6Server(srv_, json));
     ASSERT_TRUE(x);
     comment_ = parseAnswer(rcode_, x);
+    std::cout << comment_->str() << std::endl;
     ASSERT_EQ(0, rcode_);
 
     Subnet6Ptr subnet = CfgMgr::instance().getSubnet6(IOAddress("2001:db8:1::5"));
@@ -795,9 +796,9 @@ TEST_F(Dhcp6ParserTest, stdOptionData) {
     // If cast was successful we may use accessors exposed by
     // Option6IA to validate that the content of this option
     // has been set correctly.
-    EXPECT_EQ(0xABCDEF01, optionIA->getIAID());
-    EXPECT_EQ(0x02030405, optionIA->getT1());
-    EXPECT_EQ(0x06070809, optionIA->getT2());
+    EXPECT_EQ(12345, optionIA->getIAID());
+    EXPECT_EQ(6789, optionIA->getT1());
+    EXPECT_EQ(1516, optionIA->getT2());
 }
 
 };



More information about the bind10-changes mailing list