summaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Extend storage array to contain additional dataMatt Spinler2018-02-231-2/+2
| | | | | | | | | | | | | | | | | | | This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra field for use by anything that needs it. For example, the storage is currently used to store property values, and a future change to the CountCondition class will now also store the result of the comparisons done between the property values and another value specified in the rule YAML. Then, a callback will be able to see the result of whether each property passed the check. Tested: Build and run unit tests Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Implement create function in event managerRatan Gupta2018-02-231-1/+3
| | | | | | | | | Implement the logging event interface. Create the dbus event object based on the event type. Change-Id: Idfa9e5c43f170d904fd25f22d73e0509b1785fc9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add callback contextsRatan Gupta2018-02-221-1/+1
| | | | | | | | | | | | | | | | | Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in. There are two context on which call back can be invoked 1) Startup: during startup all the call backs will be called 2) Signal: As part of condition match on the watched properties. Callback would behave differently based on the context. eg: eventCallback 1) Startup: Don't take any action. 2) Signal: Create the Dbus Object for the event. Change-Id: If455558798ac3e44bbd8a93de0ce1b09d2e308ae Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add ResolveCallout classMatt Spinler2017-11-141-1/+2
| | | | | | | | | | | | | | | This class is a type of callback, and when triggered will resolve all error log entries that have the specified callout. It does this by setting the Resolved property on the log entry. It can be used to do things like resolve all errors against a particular part when that part is replaced, which would be done by specifying this class as a callback on a watch on the Present property for the part in the inventory. Change-Id: I50557938c9e15a91744ee2a16d67eaa7f367ef04 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Spelling fixesGunnar Mills2017-10-255-6/+6
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I83c844373ea41d762367085cb16b01d31676e33d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add more elog testsGunnar Mills2017-08-212-4/+27
| | | | | | | Add tests to callbackgroupgentest/test.yaml Change-Id: I0b9d4799dd3ed3a4876115594aacbd80caa3f9d0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add tests for elogGunnar Mills2017-08-211-1/+7
| | | | | Change-Id: I58a6ac714cfa80462ab53d4487dc727e40038b06 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Invoke callbacks under make checkBrad Bishop2017-06-193-0/+28
| | | | | | | | | Add a simple test that invokes all the callbacks. There are no assertions but there is some value in ensuring the application will at least run without crashing. Change-Id: I117bff261202ae7e642094a659a954328351eac1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* pdmgen: Require uppercase meta keysBrad Bishop2017-06-1912-66/+66
| | | | | | | | | journald ignores lowercase metadata keys so require them to be uppercase. Abort the config file parse when lowercase keys are found. Change-Id: Icffffdc6680b4d305329c3395f8e2fda6210964f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Correct out of tree build bugsBrad Bishop2017-06-191-6/+6
| | | | | Change-Id: Id6e14414c6f15c11d1476039e3781d719f693d21 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcase for conditionsBrad Bishop2017-06-195-0/+188
| | | | | Change-Id: I94059c0be78d5b97e7e0e11c78d4a164a98a483e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcase for callback groupsBrad Bishop2017-06-195-0/+151
| | | | | Change-Id: Icbdc8612d73bed065227d9edfde1426206886652 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcase for callbacksBrad Bishop2017-06-196-0/+168
| | | | | Change-Id: Iff1ddb9c18b5384d05a4d2dbfba95ade8cc1783c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcases for property watchesBrad Bishop2017-06-198-0/+1113
| | | | | Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I9e9266901414c71a34d9686f2a45bc4764602d53
* Add testcases for property and property groupsBrad Bishop2017-06-046-0/+266
| | | | | Change-Id: I4b30d0729a704d6833c840ea08daeee961a5730b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcases for path and path group supportBrad Bishop2017-06-046-0/+257
| | | | | Change-Id: I296de0e0cb30e0e25f6677a06bd04fe15c2fd015 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Add a test directoryBrad Bishop2017-05-232-0/+15
Add a test directory to host future unit tests. Change-Id: I5072cb3055386f7b1718edc45241c723d9e63a54 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud