test: physical: Capture Action::Blink parameters
Implement value sensing to verify behaviour of the blink action. This
constrains future blink changes to interacting with sysfs in the same
manner.
Change-Id: I7ed0a5d52e8dc99192e7938760ce99f618b9cb16
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/test/physical.cpp b/test/physical.cpp
index f62caa2..1ffe9f3 100644
--- a/test/physical.cpp
+++ b/test/physical.cpp
@@ -112,7 +112,10 @@
{
sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
NiceMock<MockLed> led;
- ON_CALL(led, getTrigger()).WillByDefault(Return("none"));
+ EXPECT_CALL(led, getTrigger()).WillOnce(Return("none"));
+ EXPECT_CALL(led, setTrigger("timer"));
+ EXPECT_CALL(led, setDelayOn(500));
+ EXPECT_CALL(led, setDelayOff(500));
phosphor::led::Physical phy(bus, LED_OBJ, led);
phy.state(Action::Blink);
}