summaryrefslogtreecommitdiffstats
path: root/src/test/yaml
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-25 22:14:54 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-19 16:26:47 -0400
commitb97bfff73e44e53571f8a00b80ec947496930d7b (patch)
tree3170f4472c9a651e563344aac6addc31d4ac7b2b /src/test/yaml
parent4041d720cf6387aa198c620cc9c6eaa86ac18cba (diff)
downloadphosphor-dbus-monitor-b97bfff73e44e53571f8a00b80ec947496930d7b.tar.gz
phosphor-dbus-monitor-b97bfff73e44e53571f8a00b80ec947496930d7b.zip
Add testcase for conditions
Change-Id: I94059c0be78d5b97e7e0e11c78d4a164a98a483e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/test/yaml')
-rw-r--r--src/test/yaml/conditiongentest/test.yaml95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/test/yaml/conditiongentest/test.yaml b/src/test/yaml/conditiongentest/test.yaml
new file mode 100644
index 0000000..0444d55
--- /dev/null
+++ b/src/test/yaml/conditiongentest/test.yaml
@@ -0,0 +1,95 @@
+# Validate condition callback rendering.
+
+- name: test path group 1
+ class: group
+ group: path
+ members:
+ - meta: path
+ path: /xyz/openbmc_project/testing/inst4
+
+- name: test path group 2
+ class: group
+ group: path
+ members:
+ - meta: path
+ path: /xyz/openbmc_project/testing/inst4
+ - meta: path
+ path: /xyz/openbmc_project/testing/inst6
+
+- name: test property group 1
+ class: group
+ group: property
+ type: int32
+ members:
+ - interface: xyz.openbmc_project.Sensor.Iface1
+ meta: property
+ property: Value
+
+- name: test property group 2
+ class: group
+ group: property
+ type: string
+ members:
+ - interface: xyz.openbmc_project.Sensor.Iface3
+ meta: property
+ property: Value2
+
+- name: test count condition 1
+ class: condition
+ condition: count
+ paths: test path group 1
+ properties: test property group 1
+ callback: test journal callback 1
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115
+
+- name: test count condition 2
+ class: condition
+ condition: count
+ paths: test path group 1
+ properties: test property group 1
+ callback: test journal callback 1
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115
+
+- name: test journal callback 1
+ class: callback
+ callback: journal
+ paths: test path group 1
+ properties: test property group 1
+ severity: INFO
+ message: Hello world from PDM!
+
+- name: test count condition 3
+ class: condition
+ condition: count
+ paths: test path group 1
+ properties: test property group 1
+ callback: test journal callback 2
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115
+
+- name: test count condition 4
+ class: condition
+ condition: count
+ paths: test path group 1
+ properties: test property group 1
+ callback: test journal callback 2
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115
+
+- name: test journal callback 2
+ class: callback
+ callback: journal
+ paths: test path group 1
+ properties: test property group 1
+ severity: INFO
+ message: Hello world from PDM!
OpenPOWER on IntegriCloud