summaryrefslogtreecommitdiff
path: root/test/redfish-core/lib/fabric_test.cpp
AgeCommit message (Collapse)AuthorFilesLines
2026-09-03bmcweb: add unit tests for Fabric Switch PowerState handlersJY Voon1-0/+165
Cover dbusToRfPowerState() and the callbacks introduced by the Fabric Switch PowerState change: afterGetSwitchPowerState and afterGetSwitchPowerStateService. The tests assert each branch's externally visible behavior: known PowerState decorator values map to the matching resource::PowerState and unmapped values yield nullopt; a property read error or an unmapped value leaves PowerState omitted without failing the request; EBADR, io_error and an empty mapper object leave PowerState omitted; any other mapper error sets an internal server error. Change-Id: Id488f88b8d7784a4f195fcf7c832fbecfdb0b513 Signed-off-by: JY Voon <jvoon@nvidia.com>