summaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* unit-test: Test interfaces added functionAndrew Geissler2019-04-052-1/+62
| | | | | | | | | | Tested: - processing.cpp at 94% coverage - Verified QEMU booted to standby and mapper command line worked - Verified hardware CI (witherspoon) passed with this patch series Change-Id: I73e5feb3495ed0aa974acd521fefd8d0193fc1b3 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Fix bug when endpoint emptyAndrew Geissler2019-04-051-6/+2
| | | | | | | | Could debate the proper handling of this situations but this commit at least makes it consistent for the forward and reverse path Change-Id: If0a8a16473c150f4d4361f9ca9aad9f06c391157 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Test associationChanged()Andrew Geissler2019-04-051-0/+139
| | | | | | | Testing: 100% coverage of associations.cpp Change-Id: I978eb37acfbee0a5b6d497cab473691318184aaf Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Debug functions to dump data structuresAndrew Geissler2019-04-051-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visualizing the key data structures in objmgr can be very useful for debug and for writing test cases Example output when new function called: ##### interface_map_type ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/test DBUS SERVICE: xyz.openbmc_project.Test INTERFACE: org.freedesktop.DBus.Introspectable INTERFACE: org.freedesktop.DBus.Peer INTERFACE: org.freedesktop.DBus.Properties ------------------------------------ ##### AssociationOwnersType ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/test/xyz DBUS SERVICE: xyz.openbmc_project.Test ASSOC PATH: /xyz/openbmc_project/inventory/system/chassis/error ENDPOINT: /xyz/openbmc_project/test/xyz ASSOC PATH: /xyz/openbmc_project/test/xyz/inventory ENDPOINT: /xyz/openbmc_project/inventory/system/chassis ----------------------------------- ##### AssociationInterfaces ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/inventory/system/chassis/error ENDPOINTS: /xyz/openbmc_project/test/xyz ------------------------------------ Change-Id: I947ccdb071d887683c3998c6020677833579100c Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Test checkAssociationEndpointRemoves()Andrew Geissler2019-04-051-0/+66
| | | | | | | Testing: 100% coverage of associations.cpp Change-Id: I311af1c868416e8e898a25e593d399cd8297ccf9 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Test deleting entry on name changeAndrew Geissler2019-04-053-3/+83
| | | | | | | | | | Breaking off into a separate function enables easier unit testing of the specific function Testing: 97% coverage of processing.cpp Change-Id: I08f229657a8f44230b711fabbae20fb403792637 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Request distinct name per test appAndrew Geissler2019-04-051-1/+10
| | | | | | | | gtest will run test suites in parallel, need to ensure each test suite (application) requests a distinct well-known name on Dbus. Change-Id: Ib59211ada5ef6404e70747b7377912384cc8c60e Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Move association create funcs to utilAndrew Geissler2019-04-052-46/+48
| | | | | | | These will be useful in other test suites so move into util directory Change-Id: Ibea5c417e38210e6e1388cf4492af10a64db9077 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Move asio server to its own classAndrew Geissler2019-04-052-24/+39
| | | | | | | | Other test suites will need this object so move to a utility directory and inherit from. Change-Id: Ia34c8149fc0df02c510717a6efd21f51086e97e6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Test removeAssociations interfaceAndrew Geissler2019-04-052-1/+167
| | | | | | | Testing: Verified code coverage shows 100% of new interface Change-Id: I517acc02b06bbff971921e66a697fb297fde45c6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Test need_to_introspect functionAndrew Geissler2019-04-052-1/+48
| | | | | | | Testing: Verified 100% code coverage of processing.cpp Change-Id: I5ebdebe3fdcecbf250a23754f8b5c7db81bfaaa3 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* unit-test: Introduce unit tests to phosphor-objmgrAndrew Geissler2019-04-052-0/+41
Move a function to make more testable and add a test case for it Testing: Verified 100% test coverage in processing.cpp Change-Id: I0a888009cfeb57bbc8ad295681bea00b79f2a23d Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
OpenPOWER on IntegriCloud