bmc: firmware updateStarted: commit(session)
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ibd69760ba6383fa64b8be328eaa0f6fafcafb791
diff --git a/test/firmware_state_updatestarted_unittest.cpp b/test/firmware_state_updatestarted_unittest.cpp
index 392ff18..8638953 100644
--- a/test/firmware_state_updatestarted_unittest.cpp
+++ b/test/firmware_state_updatestarted_unittest.cpp
@@ -142,6 +142,19 @@
}
/*
+ * commit(session)
+ */
+TEST_F(FirmwareHandlerUpdateStartedTest,
+ CallingCommitShouldReturnTrueAndHaveNoEffect)
+{
+ getToUpdateStarted();
+ EXPECT_CALL(*updateMockPtr, triggerUpdate()).Times(0);
+
+ EXPECT_TRUE(handler->commit(session, {}));
+ expectedState(FirmwareBlobHandler::UpdateState::updateStarted);
+}
+
+/*
* stat(session) - this will trigger a check, and the state may change.
*/
@@ -149,9 +162,5 @@
* TODO: close(session) - this will abort.
*/
-/*
- * commit(session)
- */
-
} // namespace
} // namespace ipmi_flash