databaseConfigDisconnect();
}
+ /// @brief Resets the state of this object.
+ ///
+ /// Disconnects the configuration backends resets the recorded last
+ /// audit entry time.
+ void reset() {
+ databaseConfigDisconnect();
+ last_audit_entry_time_ = getInitialAuditEntryTime();
+ }
+
/// @brief (Re)connects to the specified configuration backends.
///
/// This method disconnects from any existing configuration backends
EXPECT_EQ(TEST_INSTANCE_ID, mgr.getInstanceId());
}
+// This test verifies that last audit entry time is reset upon the
+// call to CBControlBase::reset().
+TEST_F(CBControlBaseTest, reset) {
+ cb_ctl_.setLastAuditEntryTime(timestamps_["tomorrow"]);
+ cb_ctl_.reset();
+ EXPECT_EQ(cb_ctl_.getInitialAuditEntryTime(), cb_ctl_.getLastAuditEntryTime());
+}
+
// This test verifies that it is correctly determined whether the
// server should fetch the particular configuration element.
TEST_F(CBControlBaseTest, fetchConfigElement) {