bmc: only add verifyBlobId if data sent for image

If data was sent to the hash only, don't add verify until they've at
least opened the image blob id.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ifc03ac7090e7edbceeac414e908bc5aedb7ad1c3
diff --git a/bmc/test/firmware_state_verificationpending_unittest.cpp b/bmc/test/firmware_state_verificationpending_unittest.cpp
index fbcd73d..64d82ca 100644
--- a/bmc/test/firmware_state_verificationpending_unittest.cpp
+++ b/bmc/test/firmware_state_verificationpending_unittest.cpp
@@ -153,13 +153,23 @@
 TEST_F(FirmwareHandlerVerificationPendingTest,
        StatOnVerificationBlobReturnsFailure)
 {
-    getToVerificationPending(hashBlobId);
+    getToVerificationPending(staticLayoutBlobId);
     ASSERT_TRUE(handler->canHandleBlob(verifyBlobId));
 
     blobs::BlobMeta meta;
     EXPECT_FALSE(handler->stat(verifyBlobId, &meta));
 }
 
+TEST_F(FirmwareHandlerVerificationPendingTest,
+       VerificationBlobNotFoundWithoutStaticDataAsWell)
+{
+    /* If you only ever open the hash blob id, and never the firmware blob id,
+     * the verify blob isn't added.
+     */
+    getToVerificationPending(hashBlobId);
+    EXPECT_FALSE(handler->canHandleBlob(verifyBlobId));
+}
+
 TEST_F(FirmwareHandlerVerificationPendingTest, StatOnNormalBlobsReturnsSuccess)
 {
     getToVerificationPending(staticLayoutBlobId);