test: firmware uploadInProgress: read
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I64af96e19415b783e8063bcd04ee253823910547
diff --git a/test/firmware_state_uploadinprogress_unittest.cpp b/test/firmware_state_uploadinprogress_unittest.cpp
index 6b0394a..d5d929f 100644
--- a/test/firmware_state_uploadinprogress_unittest.cpp
+++ b/test/firmware_state_uploadinprogress_unittest.cpp
@@ -18,6 +18,7 @@
{
using ::testing::ContainerEq;
+using ::testing::IsEmpty;
using ::testing::Return;
using ::testing::UnorderedElementsAreArray;
@@ -273,6 +274,12 @@
/*
* read(session)
*/
+TEST_F(FirmwareHandlerUploadInProgressTest, ReadImageFileReturnsFailure)
+{
+ /* Read is not supported. */
+ openToInProgress(staticLayoutBlobId);
+ EXPECT_THAT(handler->read(session, 0, 32), IsEmpty());
+}
/*
* commit(session)