Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
a5c587cc
Commit
a5c587cc
authored
May 18, 2012
by
Tomek Mrugalski
🛰
Browse files
Merge branch 'trac1967'
parents
d577a668
bb73dd2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
View file @
a5c587cc
...
...
@@ -25,6 +25,7 @@
#include
<dhcp6/dhcp6_srv.h>
#include
<util/buffer.h>
#include
<util/range_utilities.h>
#include
<boost/scoped_ptr.hpp>
using
namespace
std
;
using
namespace
isc
;
...
...
@@ -85,9 +86,9 @@ TEST_F(Dhcpv6SrvTest, basic) {
TEST_F
(
Dhcpv6SrvTest
,
DUID
)
{
// tests that DUID is generated properly
Dhcpv6Srv
*
srv
=
NULL
;
boost
::
scoped_ptr
<
Dhcpv6Srv
>
srv
;
ASSERT_NO_THROW
(
{
srv
=
new
Dhcpv6Srv
(
DHCP6_SERVER_PORT
+
10000
);
srv
.
reset
(
new
Dhcpv6Srv
(
DHCP6_SERVER_PORT
+
10000
)
)
;
});
OptionPtr
srvid
=
srv
->
getServerID
();
...
...
@@ -143,18 +144,24 @@ TEST_F(Dhcpv6SrvTest, DUID) {
}
case
DUID_LL
:
{
// not supported yet
cout
<<
"Test not implemented for DUID-LL yet."
<<
endl
;
cout
<<
"Test not implemented for DUID-LL."
<<
endl
;
// No failure here. There's really no way for test LL DUID. It doesn't
// even make sense to check if that Link Layer is actually present on
// a physical interface. RFC3315 says a server should write its DUID
// and keep it despite hardware changes.
break
;
}
case
DUID_UUID
:
// not supported yet
default:
cout
<<
"Not supported duid type="
<<
duid_type
<<
endl
;
FAIL
()
;
ADD_FAILURE
()
<<
"Not supported duid type="
<<
duid_type
<<
endl
;
break
;
}
}
TEST_F
(
Dhcpv6SrvTest
,
DISABLED_
Solicit_basic
)
{
NakedDhcpv6Srv
*
srv
=
NULL
;
ASSERT_NO_THROW
(
srv
=
new
NakedDhcpv6Srv
()
;
);
TEST_F
(
Dhcpv6SrvTest
,
Solicit_basic
)
{
boost
::
scoped_ptr
<
NakedDhcpv6Srv
>
srv
;
ASSERT_NO_THROW
(
srv
.
reset
(
new
NakedDhcpv6Srv
()
)
);
// a dummy content for client-id
OptionBuffer
clntDuid
(
32
);
...
...
@@ -223,8 +230,6 @@ TEST_F(Dhcpv6SrvTest, DISABLED_Solicit_basic) {
EXPECT_TRUE
(
tmp
->
getData
()
==
srv
->
getServerID
()
->
getData
());
// more checks to be implemented
delete
srv
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment