bmc: firmware updatePending: commit(session)
Commit(updateBlobId) will trigger the update.
Now you can only trigger if you're in the correct state, therefore
delete obsolete unit-tests that didn't set up the correct starting
condition.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If97d1db21269027dc61c9cd295f022499e949106
diff --git a/test/firmware_unittest.hpp b/test/firmware_unittest.hpp
index 2427b82..0aa7e12 100644
--- a/test/firmware_unittest.hpp
+++ b/test/firmware_unittest.hpp
@@ -29,8 +29,12 @@
std::make_unique<VerificationMock>();
verifyMockPtr = reinterpret_cast<VerificationMock*>(verifyMock.get());
+ std::unique_ptr<UpdateInterface> updateMock =
+ std::make_unique<UpdateMock>();
+ updateMockPtr = reinterpret_cast<UpdateMock*>(updateMock.get());
+
handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- blobs, data, std::move(verifyMock), CreateUpdateMock());
+ blobs, data, std::move(verifyMock), std::move(updateMock));
}
void expectedState(FirmwareBlobHandler::UpdateState state)
@@ -45,6 +49,7 @@
{FirmwareBlobHandler::UpdateFlags::ipmi, nullptr}};
std::unique_ptr<blobs::GenericBlobInterface> handler;
VerificationMock* verifyMockPtr;
+ UpdateMock* updateMockPtr;
};
class IpmiOnlyFirmwareTest : public ::testing::Test