test mock: add implementation of getBlobManager
This is a basic implementation that can be improved later. It provides
for returning a pointer that you provide in your test when needed.
Change-Id: I4647c7f8cb55fa2f37ce1561af5d528b75832d56
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/blobs-ipmid/test/manager_mock.hpp b/blobs-ipmid/test/manager_mock.hpp
index 3a9d065..a4714f8 100644
--- a/blobs-ipmid/test/manager_mock.hpp
+++ b/blobs-ipmid/test/manager_mock.hpp
@@ -27,4 +27,16 @@
MOCK_METHOD3(write, bool(uint16_t, uint32_t, const std::vector<uint8_t>&));
MOCK_METHOD1(deleteBlob, bool(const std::string&));
};
+
+/*
+ * Provide a one-off implementation for now.
+ * To test this, set managerReturned as you need.
+ */
+ManagerInterface* managerReturned;
+
+ManagerInterface* getBlobManager()
+{
+ return managerReturned;
+}
+
} // namespace blobs