test: firmware uploadInProgress: writeMeta typo
Typo was that it was originally titled to return success, then
implemented, and really the success is a nice failure. Read() returns
no data on failure instead of something useful. writeMeta actually
returns a boolean on failure. Therefore, this test returns failure.
However, it's returning failure because it doesn't have a data handler.
There is another test already that handles that.
FirmwareHandlerWriteMetaTest.WriteConfigParametersPassedThrough
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If2816b6adee196445cd67b30782635aae214dc06
diff --git a/test/firmware_state_uploadinprogress_unittest.cpp b/test/firmware_state_uploadinprogress_unittest.cpp
index 4a82628..691a8a6 100644
--- a/test/firmware_state_uploadinprogress_unittest.cpp
+++ b/test/firmware_state_uploadinprogress_unittest.cpp
@@ -238,7 +238,8 @@
/*
* writemeta(session)
*/
-TEST_F(FirmwareHandlerUploadInProgressTest, WriteMetaAgainstImageReturnsSuccess)
+TEST_F(FirmwareHandlerUploadInProgressTest,
+ WriteMetaAgainstImageReturnsFailureIfNoDataHandler)
{
/* Calling write/read/writeMeta are uninteresting against the open blob in
* this case because the blob will just pass the call along. Whereas
@@ -246,6 +247,9 @@
*/
openToInProgress(staticLayoutBlobId);
+ /* TODO: Consider adding a test that has a data handler, but that test
+ * already exists under the general writeMeta test suite.
+ */
/* Note: with IPMI as the transport there's no data handler, so this should
* fail nicely. */
std::vector<std::uint8_t> bytes = {0x01, 0x02};