Skip to content

Commit f784617

Browse files
committed
[#3477] Applied new patch
1 parent 4435737 commit f784617

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class CtrlChannelDhcpv4SrvTest : public ::testing::Test {
118118
if (env) {
119119
socket_path_ = string(env) + "/kea4.sock";
120120
} else {
121-
socket_path_ = sandbox.join("kea4.sock");
121+
socket_path_ = sandbox.join("/kea4.sock");
122122
}
123123
reset();
124124
IfaceMgr::instance().setTestMode(false);
@@ -1068,6 +1068,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, serverTagGet) {
10681068
// Retry...
10691069
sendUnixCommand("{ \"command\": \"server-tag-get\" }", response);
10701070
expected = "{ \"arguments\": { \"server-tag\": \"foobar\" }, \"result\": 0 }";
1071+
EXPECT_EQ(expected, response);
10711072
}
10721073

10731074
// This test verifies that the DHCP server handles status-get commands

src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include <log/logger_support.h>
2323
#include <stats/stats_mgr.h>
2424
#include <util/multi_threading_mgr.h>
25+
#include <util/chrono_time_utils.h>
2526
#include <testutils/io_utils.h>
2627
#include <testutils/unix_control_client.h>
2728
#include <testutils/sandbox.h>
28-
#include <util/chrono_time_utils.h>
2929

3030
#include "marker_file.h"
3131
#include "test_libraries.h"
@@ -460,6 +460,8 @@ TEST_F(CtrlDhcpv6SrvTest, commands) {
460460
result = CommandMgr::instance().processCommand(createCommand("shutdown", params));
461461
comment = parseAnswer(rcode, result);
462462
EXPECT_EQ(0, rcode); // expect success
463+
// Exit value should default to 0.
464+
EXPECT_EQ(0, server_->getExitValue());
463465

464466
// Case 3: send shutdown command with exit-value parameter.
465467
ConstElementPtr x(new isc::data::IntElement(77));
@@ -473,8 +475,6 @@ TEST_F(CtrlDhcpv6SrvTest, commands) {
473475
EXPECT_EQ(77, srv->getExitValue());
474476
}
475477

476-
typedef std::map<std::string, isc::data::ConstElementPtr> ElementMap;
477-
478478
// This test checks which commands are registered by the DHCPv6 server.
479479
TEST_F(CtrlDhcpv6SrvTest, commandsRegistration) {
480480

@@ -607,8 +607,8 @@ TEST_F(CtrlChannelDhcpv6SrvTest, controlChannelStats) {
607607
};
608608

609609
std::ostringstream s;
610-
bool first = true;
611610
s << "{ \"arguments\": { ";
611+
bool first = true;
612612
for (auto const& st : initial_stats) {
613613
if (!first) {
614614
s << ", ";

0 commit comments

Comments
 (0)