summaryrefslogtreecommitdiffstats
path: root/test/physical.cpp
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-05-25 14:51:45 +0930
committerAndrew Jeffery <andrew@aj.id.au>2019-04-08 13:48:50 +0930
commit861e5625ed88a7eb68c671a91d7d68b9fa71aad2 (patch)
tree81a8f491855c0a02948dee48bb8af0a26697871a /test/physical.cpp
parentaee9c2c452db3ce43df62a0ac779fda6e65a64ca (diff)
downloadphosphor-led-sysfs-861e5625ed88a7eb68c671a91d7d68b9fa71aad2.tar.gz
phosphor-led-sysfs-861e5625ed88a7eb68c671a91d7d68b9fa71aad2.zip
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>
Diffstat (limited to 'test/physical.cpp')
-rw-r--r--test/physical.cpp5
1 files changed, 4 insertions, 1 deletions
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 @@ TEST(Physical, blink)
{
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);
}
OpenPOWER on IntegriCloud