tools: implement method to send ipmi packet to BMC
Implement method to send ipmi packets to BMC. Only currently supports
the system interface.
Tested: Verified on a host that has the BLOB handler installed on the
BMC, that it received a blob count of 0, as there were no handlers
installed at that test. Further functional tests will verify cases with
the firmware handler installed, however, it is verified that this code
correctly speaks IPMI to the BLOB handler registered.
Change-Id: I696f3915930cc9fa5e768fbdeed484ea6cb707a2
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/tools_ipmi_unittest.cpp b/test/tools_ipmi_unittest.cpp
index 8a72489..d0c9911 100644
--- a/test/tools_ipmi_unittest.cpp
+++ b/test/tools_ipmi_unittest.cpp
@@ -1,4 +1,5 @@
#include "internal_sys_mock.hpp"
+#include "ipmi_errors.hpp"
#include "ipmi_handler.hpp"
namespace host_tool
@@ -14,7 +15,7 @@
IpmiHandler ipmi(&sysMock);
EXPECT_CALL(sysMock, open(_, _)).WillRepeatedly(Return(-1));
- EXPECT_EQ(false, ipmi.open());
+ EXPECT_THROW(ipmi.open(), IpmiException);
}
} // namespace host_tool