test: firmware uploadInProgress: commit

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2cdd63ff7b596bf59746f0669fa97c40a4fd51f5
diff --git a/test/firmware_state_uploadinprogress_unittest.cpp b/test/firmware_state_uploadinprogress_unittest.cpp
index d5d929f..4a82628 100644
--- a/test/firmware_state_uploadinprogress_unittest.cpp
+++ b/test/firmware_state_uploadinprogress_unittest.cpp
@@ -284,6 +284,19 @@
 /*
  * commit(session)
  */
+TEST_F(FirmwareHandlerUploadInProgressTest,
+       CommitAgainstImageFileReturnsFailure)
+{
+    /* Commit is only valid against specific blobs. */
+    openToInProgress(staticLayoutBlobId);
+    EXPECT_FALSE(handler->commit(session, {}));
+}
+
+TEST_F(FirmwareHandlerUploadInProgressTest, CommitAgainstHashFileReturnsFailure)
+{
+    openToInProgress(hashBlobId);
+    EXPECT_FALSE(handler->commit(session, {}));
+}
 
 } // namespace
 } // namespace ipmi_flash