mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 15:35:17 +00:00
[#2658] address review comments
This commit is contained in:
@@ -908,21 +908,6 @@ public:
|
|||||||
ASSERT_TRUE(obs) << "cannot find: " << stats_name;
|
ASSERT_TRUE(obs) << "cannot find: " << stats_name;
|
||||||
EXPECT_EQ(exp_value, obs->getInteger().first);
|
EXPECT_EQ(exp_value, obs->getInteger().first);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Checks the value of a big integer statistic for a given subnet.
|
|
||||||
///
|
|
||||||
/// @param subnet_id identifier of a subnet for which the statistic should be checked
|
|
||||||
/// @param name statistic name (e.g. "total-nas", "total-pds", ...)
|
|
||||||
/// @param exp_value expected value of the statistic
|
|
||||||
///
|
|
||||||
/// @return Number of assigned addresses for a subnet.
|
|
||||||
void checkBigSubnetStat(const SubnetID& subnet_id, const std::string& name, int64_t exp_value) const {
|
|
||||||
// Retrieve statistics name, e.g. subnet[1234].assigned-addresses.
|
|
||||||
const std::string stats_name = StatsMgr::generateName("subnet", subnet_id, name);
|
|
||||||
ObservationPtr obs = StatsMgr::instance().getObservation(stats_name);
|
|
||||||
ASSERT_TRUE(obs) << "cannot find: " << stats_name;
|
|
||||||
EXPECT_EQ(exp_value, obs->getBigInteger().first);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Tests the following scenario:
|
// Tests the following scenario:
|
||||||
|
@@ -215,7 +215,8 @@ public:
|
|||||||
|
|
||||||
/// @name pure virtuals, every derived class must implement these
|
/// @name pure virtuals, every derived class must implement these
|
||||||
|
|
||||||
/// @return true if the other ElementPtr has the same type and value
|
/// @return true if the other ElementPtr has the same value and the same
|
||||||
|
/// type (or a different and compatible type), false otherwise.
|
||||||
virtual bool equals(const Element& other) const = 0;
|
virtual bool equals(const Element& other) const = 0;
|
||||||
|
|
||||||
/// Converts the Element to JSON format and appends it to
|
/// Converts the Element to JSON format and appends it to
|
||||||
@@ -656,7 +657,10 @@ public:
|
|||||||
/// stringstream.
|
/// stringstream.
|
||||||
void toJSON(std::ostream& ss) const override;
|
void toJSON(std::ostream& ss) const override;
|
||||||
|
|
||||||
/// @brief Checks whether the other Element has the same type and value.
|
/// @brief Checks whether the other Element is equal.
|
||||||
|
///
|
||||||
|
/// @return true if the other ElementPtr has the same value and the same
|
||||||
|
/// type (or a different and compatible type), false otherwise.
|
||||||
bool equals(const Element& other) const override;
|
bool equals(const Element& other) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user