Commit eddc1628 authored by Francis Dupont's avatar Francis Dupont Committed by Marcin Siodelski
Browse files

[#1041] Added getLastCommitTime unit test

parent 51a47278
......@@ -461,12 +461,19 @@ TEST_F(CfgMgrTest, staging) {
// This should change the staging configuration so as it becomes a current
// one.
auto before = boost::posix_time::second_clock::universal_time();
auto after = boost::posix_time::second_clock::universal_time();
const_config = cfg_mgr.getCurrentCfg();
// Sequence id equal to 1 indicates that the current configuration points
// to the configuration that used to be a staging configuration previously.
EXPECT_EQ(1, const_config->getSequence());
// Last commit timestamp should be between before and after.
auto reload = const_config->getLastCommitTime();
EXPECT_LE(before, reload);
EXPECT_GE(after, reload);
// Create a new staging configuration. It should be assigned a new
// sequence id.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment