summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-08-15 12:39:04 -0500
committerGunnar Mills <gmills@us.ibm.com>2017-08-21 14:26:46 +0000
commit937df1a99a263e73f820a66dada29cde2f58e847 (patch)
treeca2a8cdae3345039acafdb5e50b66688e34b50be
parentacac602db5e27f315bb63df2910682615aae5cfd (diff)
downloadphosphor-dbus-monitor-937df1a99a263e73f820a66dada29cde2f58e847.tar.gz
phosphor-dbus-monitor-937df1a99a263e73f820a66dada29cde2f58e847.zip
Add more elog tests
Add tests to callbackgroupgentest/test.yaml Change-Id: I0b9d4799dd3ed3a4876115594aacbd80caa3f9d0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--src/example/test.yaml7
-rw-r--r--src/test/callbackgroupgentest.cpp8
-rw-r--r--src/test/yaml/callbackgroupgentest/test.yaml23
3 files changed, 34 insertions, 4 deletions
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<std::vector<size_t>, 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
OpenPOWER on IntegriCloud