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
415
Issues
415
List
Boards
Labels
Service Desk
Milestones
Merge Requests
65
Merge Requests
65
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
7bcfafaf
Commit
7bcfafaf
authored
Dec 19, 2019
by
Razvan Becheriu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#1069
] fix crashing unittests on no op database actions
parent
47830cb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
+3
-3
src/lib/dhcpsrv/tests/test_utils.cc
src/lib/dhcpsrv/tests/test_utils.cc
+4
-0
src/lib/dhcpsrv/testutils/host_data_source_utils.cc
src/lib/dhcpsrv/testutils/host_data_source_utils.cc
+2
-0
No files found.
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
View file @
7bcfafaf
...
...
@@ -1782,9 +1782,9 @@ GenericLeaseMgrTest::testGetLeases6Duid() {
Lease6Collection
returned3
=
lmptr_
->
getLeases6
(
*
(
lease3
->
duid_
));
//verify if the returned lease mathces
EXPEC
T_EQ
(
returned1
.
size
(),
1
);
EXPEC
T_EQ
(
returned2
.
size
(),
1
);
EXPEC
T_EQ
(
returned3
.
size
(),
1
);
ASSER
T_EQ
(
returned1
.
size
(),
1
);
ASSER
T_EQ
(
returned2
.
size
(),
1
);
ASSER
T_EQ
(
returned3
.
size
(),
1
);
//verify that the returned lease are same
EXPECT_TRUE
(
returned1
[
0
]
->
addr_
==
lease1
->
addr_
);
...
...
src/lib/dhcpsrv/tests/test_utils.cc
View file @
7bcfafaf
...
...
@@ -26,6 +26,8 @@ detailCompareLease(const Lease4Ptr& first, const Lease4Ptr& second) {
// odd things happen when they are different: the EXPECT_EQ macro appears to
// call the operator uint32_t() function, which causes an exception to be
// thrown for IPv6 addresses.
ASSERT_TRUE
(
first
);
ASSERT_TRUE
(
second
);
EXPECT_EQ
(
first
->
addr_
,
second
->
addr_
);
// We need to compare the actual HWAddr objects, not pointers
...
...
@@ -66,6 +68,8 @@ detailCompareLease(const Lease4Ptr& first, const Lease4Ptr& second) {
void
detailCompareLease
(
const
Lease6Ptr
&
first
,
const
Lease6Ptr
&
second
)
{
ASSERT_TRUE
(
first
);
ASSERT_TRUE
(
second
);
EXPECT_EQ
(
first
->
type_
,
second
->
type_
);
// Compare address strings. Comparison of address objects is not used, as
...
...
src/lib/dhcpsrv/testutils/host_data_source_utils.cc
View file @
7bcfafaf
...
...
@@ -209,6 +209,8 @@ HostDataSourceUtils::compareDuids(const ConstHostPtr& host1,
void
HostDataSourceUtils
::
compareHosts
(
const
ConstHostPtr
&
host1
,
const
ConstHostPtr
&
host2
)
{
ASSERT_TRUE
(
host1
);
ASSERT_TRUE
(
host2
);
// Let's compare HW addresses and expect match.
compareHwaddrs
(
host1
,
host2
,
true
);
...
...
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