test: firmware updateStarted: open(blob)
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I77ebff81fed626a9e2a29c0c77d4bdb5fcf28c61
diff --git a/test/firmware_state_updatestarted_unittest.cpp b/test/firmware_state_updatestarted_unittest.cpp
index 34e6666..afea475 100644
--- a/test/firmware_state_updatestarted_unittest.cpp
+++ b/test/firmware_state_updatestarted_unittest.cpp
@@ -39,6 +39,21 @@
{
};
+/*
+ * open(blob)
+ */
+TEST_F(FirmwareHandlerUpdateStartedTest, AttemptToOpenFilesReturnsFailure)
+{
+ /* In state updateStarted a file is open, which means no others can be. */
+ getToUpdateStarted();
+
+ auto blobsToOpen = handler->getBlobIds();
+ for (const auto& blob : blobsToOpen)
+ {
+ EXPECT_FALSE(handler->open(session + 1, flags, blob));
+ }
+}
+
/* canHandleBlob(blob)
* getBlobIds
*/
@@ -54,9 +69,6 @@
/*
* stat(session)
*/
-/*
- * open(blob)
- */
/*
* close(session)