From 937df1a99a263e73f820a66dada29cde2f58e847 Mon Sep 17 00:00:00 2001 From: Gunnar Mills Date: Tue, 15 Aug 2017 12:39:04 -0500 Subject: Add more elog tests Add tests to callbackgroupgentest/test.yaml Change-Id: I0b9d4799dd3ed3a4876115594aacbd80caa3f9d0 Signed-off-by: Gunnar Mills --- src/example/test.yaml | 7 +++++++ src/test/callbackgroupgentest.cpp | 8 ++++---- src/test/yaml/callbackgroupgentest/test.yaml | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/example/test.yaml b/src/example/test.yaml index 43755f3..fc1eaa7 100644 --- a/src/example/test.yaml +++ b/src/example/test.yaml @@ -271,6 +271,13 @@ value: testing... type: string +- name: test no metadata elog + class: callback + callback: elog + paths: test path group + properties: test string property group + error: xyz::openbmc_project::Common::Error::InternalFailure + - name: test method class: callback callback: method diff --git a/src/test/callbackgroupgentest.cpp b/src/test/callbackgroupgentest.cpp index 6493d9a..3112295 100644 --- a/src/test/callbackgroupgentest.cpp +++ b/src/test/callbackgroupgentest.cpp @@ -8,10 +8,10 @@ using namespace phosphor::dbus::monitoring; #include "callbackgroupgentest.hpp" const std::array, 4> expectedGroups = {{ - {0, 1, 2}, - {0, 1}, - {2, 4, 5}, - {5}, + {0, 1, 2, 3}, + {0, 1, 4}, + {2, 6, 7}, + {7}, } }; diff --git a/src/test/yaml/callbackgroupgentest/test.yaml b/src/test/yaml/callbackgroupgentest/test.yaml index 91a4923..afb9d7e 100644 --- a/src/test/yaml/callbackgroupgentest/test.yaml +++ b/src/test/yaml/callbackgroupgentest/test.yaml @@ -58,6 +58,27 @@ severity: INFO message: Hello world from PDM! +- name: test elog callback 1 + class: callback + callback: elog + paths: test path group 2 + properties: test property group 2 + error: xyz::openbmc_project::Common::Error::InvalidArgument + metadata: + - name: xyz::openbmc_project::Common::InvalidArgument::ARGUMENT_NAME + value: testing... + type: string + - name: xyz::openbmc_project::Common::InvalidArgument::ARGUMENT_VALUE + value: testing... + type: string + +- name: test elog callback 2 + class: callback + callback: elog + paths: test path group 2 + properties: test property group 2 + error: xyz::openbmc_project::Common::Error::InternalFailure + - name: test group callback 1 class: callback callback: group @@ -65,6 +86,7 @@ - test journal callback 1 - test journal callback 2 - test journal callback 3 + - test elog callback 1 - name: test group callback 2 class: callback @@ -72,6 +94,7 @@ members: - test journal callback 1 - test journal callback 2 + - test elog callback 2 - name: test group callback 3 class: callback -- cgit v1.2.1