]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
option6_addrlst test no longer uses ::2 as it confuses IOAddress class.
authorTomek Mrugalski <tomasz@isc.org>
Mon, 17 Oct 2011 11:53:53 +0000 (13:53 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 17 Oct 2011 11:53:53 +0000 (13:53 +0200)
src/lib/dhcp/tests/option6_addrlst_unittest.cc

index 3a1975d8ff868944c5b244aea56edc146f5fd6b5..2a2fc1a1c6dcb55d2bed204d168f1ebe2962cdc0 100644 (file)
@@ -209,11 +209,19 @@ TEST_F(Option6AddrLstTest, setAddress) {
     EXPECT_NO_THROW(
         opt1 = new Option6AddrLst(1234, IOAddress("::1"));
     );
-    opt1->setAddress(IOAddress("::2"));
+    opt1->setAddress(IOAddress("2001:db8:1::2"));
+    /// TODO It used to be ::2 address, but io_address represents
+    /// it as ::0.0.0.2. Purpose of this test is to verify
+    /// that setAddress() works, not deal with subtleties of
+    /// io_address handling of IPv4-mapped IPv6 addresses, we
+    /// switched to a more common address. User interested
+    /// in pursuing this matter further is encouraged to look
+    /// at section 2.5.5 of RFC4291 (and possibly implement
+    /// a test for IOAddress)
 
     Option6AddrLst::AddressContainer addrs = opt1->getAddresses();
     ASSERT_EQ(1, addrs.size() );
-    EXPECT_EQ("::2", addrs[0].toText());
+    EXPECT_EQ("2001:db8:1::2", addrs[0].toText());
 
     EXPECT_NO_THROW(
         delete opt1;