blob: f34144718f359ff0f9416eba9e9ded6c91020236 [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
19 EXPECT_EQ(ERROR_INFO_CAP , manager.getInfoErrSize());
20
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());
27
28}
29
30}// namespace internal
31}// namespace logging
32}// namespace phosphor