summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/tests/dhcp6_test_utils.cc
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2019-09-06 12:49:09 +0200
committerMarcin Siodelski <marcin@isc.org>2019-09-06 12:49:09 +0200
commit9a7a92f1e91186a09d039a749a92bf36573ffa17 (patch)
tree3aa29d0107d5bdbff499bb3050bd5b0283d12ace /src/bin/dhcp6/tests/dhcp6_test_utils.cc
parent[#755,!503] Removed spurious whitespace. (diff)
downloadkea-9a7a92f1e91186a09d039a749a92bf36573ffa17.tar.xz
kea-9a7a92f1e91186a09d039a749a92bf36573ffa17.zip
[#755,!503] Address outstanding review comments.
This checks that selected packet statistics is set to 0 before the test.
Diffstat (limited to 'src/bin/dhcp6/tests/dhcp6_test_utils.cc')
-rw-r--r--src/bin/dhcp6/tests/dhcp6_test_utils.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/dhcp6/tests/dhcp6_test_utils.cc b/src/bin/dhcp6/tests/dhcp6_test_utils.cc
index 7210a288b1..eef9b61efc 100644
--- a/src/bin/dhcp6/tests/dhcp6_test_utils.cc
+++ b/src/bin/dhcp6/tests/dhcp6_test_utils.cc
@@ -773,8 +773,10 @@ Dhcpv6SrvTest::testReceiveStats(uint8_t pkt_type, const std::string& stat_name)
// Check that the tested statistics is initially set to 0
ObservationPtr pkt6_rcvd = mgr.getObservation("pkt6-received");
ObservationPtr tested_stat = mgr.getObservation(stat_name);
- EXPECT_TRUE(pkt6_rcvd);
- EXPECT_TRUE(tested_stat);
+ ASSERT_TRUE(pkt6_rcvd);
+ ASSERT_TRUE(tested_stat);
+ EXPECT_EQ(0, pkt6_rcvd->getInteger().first);
+ EXPECT_EQ(0, tested_stat->getInteger().first);
// Simulate that we have received that traffic
srv.fakeReceive(pkt);