MCPcopy Create free account
hub / github.com/Icinga/icinga2 / ExpectLogPattern

Method ExpectLogPattern

test/base-testloggerfixture.hpp:124–128  ·  view source on GitHub ↗

* Asserts the presence of a log entry that matches the given regex pattern. * * First, the existing log entries are searched for the pattern. If the pattern isn't found, * until the timeout is reached, the function will wait if a new log message is added that * matches the pattern. * * A boost assertion result object is returned, that evaluates to bool, but contains an * error messag

Source from the content-addressed store, hash-verified

122 * @return A @c boost::test_tools::assertion_result object that can be used in BOOST_REQUIRE
123 */
124 auto ExpectLogPattern(const std::string& pattern,
125 const std::chrono::milliseconds& timeout = std::chrono::seconds(0))
126 {
127 return testLogger->ExpectLogPattern(pattern, timeout);
128 }
129
130 void ClearTestLogger() const { testLogger->Clear(); }
131

Callers

nothing calls this directly

Calls 1

ExpectLogPatternMethod · 0.45

Tested by

no test coverage detected