bmc: move from data section objs to owned
Move from objects created ahead of purpose to owned objects. This is a
step towards integrating with the json support.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I738a5edd40724f17245911af1080c350f029fef1
diff --git a/bmc/test/firmware_close_unittest.cpp b/bmc/test/firmware_close_unittest.cpp
index d4e7cf8..87de86e 100644
--- a/bmc/test/firmware_close_unittest.cpp
+++ b/bmc/test/firmware_close_unittest.cpp
@@ -30,7 +30,7 @@
* everything looks right.
*/
EXPECT_CALL(dataMock, open()).WillOnce(Return(true));
- EXPECT_CALL(imageMock, open(StrEq(hashBlobId))).WillOnce(Return(true));
+ EXPECT_CALL(*hashImageMock, open(StrEq(hashBlobId))).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::lpc,
@@ -44,7 +44,7 @@
/* Set up close() expectations. */
EXPECT_CALL(dataMock, close());
- EXPECT_CALL(imageMock, close());
+ EXPECT_CALL(*hashImageMock, close());
EXPECT_TRUE(handler->close(0));
/* Close does not delete the active blob id. This indicates that there is
@@ -57,7 +57,7 @@
/* Boring test where you open a blob_id using ipmi, so there's no data
* handler, and it's closed and everything looks right.
*/
- EXPECT_CALL(imageMock, open(StrEq(hashBlobId))).WillOnce(Return(true));
+ EXPECT_CALL(*hashImageMock, open(StrEq(hashBlobId))).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::ipmi,
@@ -70,7 +70,7 @@
activeHashBlobId));
/* Set up close() expectations. */
- EXPECT_CALL(imageMock, close());
+ EXPECT_CALL(*hashImageMock, close());
EXPECT_TRUE(handler->close(0));
}