From: Francis Dupont Date: Thu, 11 Dec 2025 14:22:24 +0000 (+0100) Subject: [#4184] Checkpoint: fixed UTs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=657a7ca4a58f68c8dfd57ac1cb8ba95cbfd4a18e;p=thirdparty%2Fkea.git [#4184] Checkpoint: fixed UTs --- diff --git a/src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc b/src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc index 8adf1f9e06..c2705f37f9 100644 --- a/src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc +++ b/src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc @@ -655,9 +655,9 @@ TEST_F(HAImplTest, subnet4SelectDropNotInScope) { ASSERT_EQ(1, query4->getClasses().size()); EXPECT_TRUE(query4->inClass("HA_server3")); - // Drop statistics should not increase when the server doesn't serve the - // particular scope. - EXPECT_EQ(0, getStatistic("pkt4-receive-drop")); + // Drop statistics should have been increased. + EXPECT_EQ(1, getStatistic("pkt4-not-for-us")); + EXPECT_EQ(1, getStatistic("pkt4-receive-drop")); } // Tests that the subnet4_select drops a packet when no subnet has been selected. @@ -702,6 +702,7 @@ TEST_F(HAImplTest, subnet4SelectNoSubnet) { EXPECT_TRUE(query4->getClasses().empty()); // Drop statistics should have been increased. + EXPECT_EQ(1, getStatistic("pkt4-not-for-us")); EXPECT_EQ(1, getStatistic("pkt4-receive-drop")); } @@ -1106,9 +1107,9 @@ TEST_F(HAImplTest, subnet6SelectDropNotInScope) { ASSERT_EQ(1, query6->getClasses().size()); EXPECT_TRUE(query6->inClass("HA_server3")); - // Drop statistics should not increase when the server doesn't serve the - // particular scope. - EXPECT_EQ(0, getStatistic("pkt6-receive-drop")); + // Drop statistics should have been increased. + EXPECT_EQ(1, getStatistic("pkt6-not-for-us")); + EXPECT_EQ(1, getStatistic("pkt6-receive-drop")); } // Tests that the subnet6_select drops a packet when no subnet has been selected. @@ -1153,6 +1154,7 @@ TEST_F(HAImplTest, subnet6SelectNoSubnet) { EXPECT_TRUE(query6->getClasses().empty()); // Drop statistics should have been increased. + EXPECT_EQ(1, getStatistic("pkt6-not-for-us")); EXPECT_EQ(1, getStatistic("pkt6-receive-drop")); }