blob: c94c63890c07ad555c08f7117c35c354f6276bf0 [file] [log] [blame]
Nagaraju Goruganti477b7312018-06-25 23:28:58 -05001#include "elog_errorwrap_test.hpp"
2
3namespace phosphor
4{
5namespace logging
6{
7namespace internal
8{
9
10TEST_F(TestLogManager, logCap)
11{
12 for (auto i = 0; i < ERROR_INFO_CAP + 20; i++)
13 {
14 manager.commitWithLvl(i, "FOO", 6);
15 }
16
17 // Max num of Info( and below Sev) errors can be created is qual to
18 // ERROR_INFO_CAP
Patrick Venturef18bf832018-10-26 18:14:00 -070019 EXPECT_EQ(ERROR_INFO_CAP, manager.getInfoErrSize());
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050020
21 for (auto i = 0; i < ERROR_CAP + 20; i++)
22 {
23 manager.commitWithLvl(i, "FOO", 0);
24 }
25 // Max num of high severity errors can be created is qual to ERROR_CAP
26 EXPECT_EQ(ERROR_CAP, manager.getRealErrSize());
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050027}
28
Patrick Venturef18bf832018-10-26 18:14:00 -070029} // namespace internal
30} // namespace logging
31} // namespace phosphor