bmc/test: fixups detected in bazel-type build
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id5a2ac8ab7a59d6483a82e51ebcb25d7aaffaf50
diff --git a/bmc/test/firmware_canhandle_unittest.cpp b/bmc/test/firmware_canhandle_unittest.cpp
index 7df4bb8..34c4e51 100644
--- a/bmc/test/firmware_canhandle_unittest.cpp
+++ b/bmc/test/firmware_canhandle_unittest.cpp
@@ -33,7 +33,7 @@
data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
for (const auto& item : items)
{
diff --git a/bmc/test/firmware_commit_unittest.cpp b/bmc/test/firmware_commit_unittest.cpp
index 1d0a4ca..6e24107 100644
--- a/bmc/test/firmware_commit_unittest.cpp
+++ b/bmc/test/firmware_commit_unittest.cpp
@@ -49,7 +49,7 @@
* artificial test.
*/
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
EXPECT_CALL(*imageMock2, open("asdf")).WillOnce(Return(true));
@@ -65,7 +65,7 @@
* artificial test.
*/
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
EXPECT_CALL(*imageMock1, open(StrEq(hashBlobId))).WillOnce(Return(true));
diff --git a/bmc/test/firmware_handler_unittest.cpp b/bmc/test/firmware_handler_unittest.cpp
index 50d6b80..1c3cc58 100644
--- a/bmc/test/firmware_handler_unittest.cpp
+++ b/bmc/test/firmware_handler_unittest.cpp
@@ -23,7 +23,7 @@
data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- {}, std::move(data), std::move(CreateActionMap("abcd")));
+ {}, std::move(data), CreateActionMap("abcd"));
EXPECT_EQ(handler, nullptr);
}
TEST(FirmwareHandlerTest, CreateEmptyDataHandlerListFails)
@@ -35,8 +35,8 @@
blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(std::vector<DataHandlerPack>()),
- std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::vector<DataHandlerPack>(),
+ CreateActionMap("asdf"));
EXPECT_EQ(handler, nullptr);
}
TEST(FirmwareHandlerTest, CreateEmptyActionPackVerifyFails)
@@ -72,7 +72,7 @@
blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
EXPECT_EQ(handler, nullptr);
/* Add second firmware and it'll now work. */
@@ -84,8 +84,7 @@
data2.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs2), std::move(data2),
- std::move(CreateActionMap("asdf")));
+ std::move(blobs2), std::move(data2), CreateActionMap("asdf"));
auto result = handler->getBlobIds();
std::vector<std::string> expectedBlobs = {"asdf", hashBlobId};
@@ -101,7 +100,7 @@
blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
EXPECT_EQ(handler, nullptr);
std::vector<HandlerPack> blobs2;
@@ -112,8 +111,7 @@
data2.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs2), std::move(data2),
- std::move(CreateActionMap("asdf")));
+ std::move(blobs2), std::move(data2), CreateActionMap("asdf"));
auto result = handler->getBlobIds();
std::vector<std::string> expectedBlobs = {"asdf", hashBlobId};
diff --git a/bmc/test/firmware_open_unittest.cpp b/bmc/test/firmware_open_unittest.cpp
index 1eff8d3..274ea14 100644
--- a/bmc/test/firmware_open_unittest.cpp
+++ b/bmc/test/firmware_open_unittest.cpp
@@ -30,7 +30,7 @@
blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
EXPECT_FALSE(handler->open(0, GetParam(), "asdf"));
}
diff --git a/bmc/test/firmware_stat_unittest.cpp b/bmc/test/firmware_stat_unittest.cpp
index 567472d..fcb2d34 100644
--- a/bmc/test/firmware_stat_unittest.cpp
+++ b/bmc/test/firmware_stat_unittest.cpp
@@ -33,7 +33,7 @@
data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
blobs::BlobMeta meta;
EXPECT_TRUE(handler->stat("asdf", &meta));
diff --git a/bmc/test/firmware_unittest.hpp b/bmc/test/firmware_unittest.hpp
index de41cd4..445523c 100644
--- a/bmc/test/firmware_unittest.hpp
+++ b/bmc/test/firmware_unittest.hpp
@@ -214,8 +214,7 @@
data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data),
- std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
}
};
@@ -246,8 +245,7 @@
data.emplace_back(FirmwareFlags::UpdateFlags::lpc,
std::move(dataMockInstance));
handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
- std::move(blobs), std::move(data),
- std::move(CreateActionMap("asdf")));
+ std::move(blobs), std::move(data), CreateActionMap("asdf"));
}
};
diff --git a/bmc/test/triggerable_mock.hpp b/bmc/test/triggerable_mock.hpp
index 8c83d52..3469127 100644
--- a/bmc/test/triggerable_mock.hpp
+++ b/bmc/test/triggerable_mock.hpp
@@ -6,6 +6,7 @@
#include <memory>
#include <string>
+#include <gmock/gmock.h>
#include <gtest/gtest.h>
namespace ipmi_flash
@@ -28,9 +29,9 @@
ActionMap CreateActionMap(const std::string& blobPath)
{
std::unique_ptr<ActionPack> actionPack = std::make_unique<ActionPack>();
- actionPack->preparation = std::move(CreateTriggerMock());
- actionPack->verification = std::move(CreateTriggerMock());
- actionPack->update = std::move(CreateTriggerMock());
+ actionPack->preparation = CreateTriggerMock();
+ actionPack->verification = CreateTriggerMock();
+ actionPack->update = CreateTriggerMock();
ActionMap map;
map[blobPath] = std::move(actionPack);