Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
445
Issues
445
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
0bcf0ca9
Commit
0bcf0ca9
authored
Aug 24, 2019
by
Razvan Becheriu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#840
,
!27
-p] fixed freebsd unittests
parent
bf962d02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
src/lib/dhcpsrv/tests/cb_ctl_dhcp_unittest.cc
src/lib/dhcpsrv/tests/cb_ctl_dhcp_unittest.cc
+1
-1
src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc
src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc
+9
-0
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
+3
-0
No files found.
src/lib/dhcpsrv/tests/cb_ctl_dhcp_unittest.cc
View file @
0bcf0ca9
...
@@ -454,7 +454,7 @@ public:
...
@@ -454,7 +454,7 @@ public:
auto
found_network
=
networks
->
getByName
(
"one"
);
auto
found_network
=
networks
->
getByName
(
"one"
);
if
(
fetchConfigElement
(
"dhcp4_shared_network"
)
&&
if
(
fetchConfigElement
(
"dhcp4_shared_network"
)
&&
(
getTimestamp
(
"dhcp4_shared_network"
)
>
lb_modification_time
))
{
(
getTimestamp
(
"dhcp4_shared_network"
)
>
lb_modification_time
))
{
EXPEC
T_TRUE
(
found_network
);
ASSER
T_TRUE
(
found_network
);
EXPECT_TRUE
(
found_network
->
hasFetchGlobalsFn
());
EXPECT_TRUE
(
found_network
->
hasFetchGlobalsFn
());
}
else
{
}
else
{
...
...
src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc
View file @
0bcf0ca9
...
@@ -41,6 +41,11 @@ public:
...
@@ -41,6 +41,11 @@ public:
/// 0 and 0x32.
/// 0 and 0x32.
CfgHostsTest
();
CfgHostsTest
();
/// @brief Destructor.
///
/// This destructor resets global state after tests are run.
~
CfgHostsTest
();
/// @brief Increases last byte of an address.
/// @brief Increases last byte of an address.
///
///
/// @param address Address to be increased.
/// @param address Address to be increased.
...
@@ -88,6 +93,10 @@ CfgHostsTest::CfgHostsTest() {
...
@@ -88,6 +93,10 @@ CfgHostsTest::CfgHostsTest() {
}
}
}
}
CfgHostsTest
::~
CfgHostsTest
()
{
CfgMgr
::
instance
().
setFamily
(
AF_INET
);
}
IOAddress
IOAddress
CfgHostsTest
::
increase
(
const
IOAddress
&
address
,
const
uint8_t
num
)
const
{
CfgHostsTest
::
increase
(
const
IOAddress
&
address
,
const
uint8_t
num
)
const
{
std
::
vector
<
uint8_t
>
vec
=
address
.
toBytes
();
std
::
vector
<
uint8_t
>
vec
=
address
.
toBytes
();
...
...
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
View file @
0bcf0ca9
...
@@ -424,6 +424,9 @@ TEST_F(CfgMgrTest, d2ClientConfig) {
...
@@ -424,6 +424,9 @@ TEST_F(CfgMgrTest, d2ClientConfig) {
// and not the original configuration.
// and not the original configuration.
EXPECT_EQ
(
*
new_cfg
,
*
updated_config
);
EXPECT_EQ
(
*
new_cfg
,
*
updated_config
);
EXPECT_NE
(
*
original_config
,
*
updated_config
);
EXPECT_NE
(
*
original_config
,
*
updated_config
);
// Revert to default configuration.
ASSERT_NO_THROW
(
CfgMgr
::
instance
().
setD2ClientConfig
(
original_config
));
}
}
// This test verifies that the configuration staging, commit and rollback works
// This test verifies that the configuration staging, commit and rollback works
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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