Skip to content
Permalink
Browse files

[CMK-3590] - windows agent systemtime section generates '\n' too

Change-Id: Iab3501b34cd926c2fcfa3f2568769ed4b0ccf439
  • Loading branch information
s-kipnis committed Jan 14, 2020
1 parent 6fe98cb commit f074b81a68b5f08588450d235e6675aca49fae77
@@ -21,7 +21,7 @@ std::string SystemTime::makeBody() {
XLOG::t(XLOG_FUNC + " entering");

const auto now = cma::tools::SecondsSinceEpoch();
return std::to_string(now);
return std::to_string(now) + "\n";
}

} // namespace provider
@@ -92,6 +92,7 @@ TEST(SectionProviders, BasicSystemTime) {
auto& e4 = system_time_provider.getEngine();
auto system_time = e4.generateContent(section_name);
ASSERT_TRUE(!system_time.empty());
EXPECT_EQ(system_time.back(), '\n');
auto result = cma::tools::SplitString(system_time, "\n");
EXPECT_EQ(result.size(), 2);
EXPECT_EQ(result[0], "<<<systemtime>>>");

0 comments on commit f074b81

Please sign in to comment.
You can’t perform that action at this time.