bmc: add verify blob id only when ready

Originally, the verify blob id was always present.  Now, it's only added
when the state transitions initially to verificationPending.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I706273519354a7a4a98d9fe4f600c6455a69cc3c
diff --git a/test/firmware_state_verificationstarted_unittest.cpp b/test/firmware_state_verificationstarted_unittest.cpp
index a1a4cce..e27ffc7 100644
--- a/test/firmware_state_verificationstarted_unittest.cpp
+++ b/test/firmware_state_verificationstarted_unittest.cpp
@@ -153,6 +153,7 @@
 TEST_F(FirmwareHandlerVerificationStartedTest, StatOnActiveImageReturnsFailure)
 {
     getToVerificationStarted(staticLayoutBlobId);
+    ASSERT_TRUE(handler->canHandleBlob(activeImageBlobId));
 
     blobs::BlobMeta meta;
     EXPECT_FALSE(handler->stat(activeImageBlobId, &meta));
@@ -160,7 +161,8 @@
 
 TEST_F(FirmwareHandlerVerificationStartedTest, StatOnActiveHashReturnsFailure)
 {
-    getToVerificationStarted(staticLayoutBlobId);
+    getToVerificationStarted(hashBlobId);
+    ASSERT_TRUE(handler->canHandleBlob(activeHashBlobId));
 
     blobs::BlobMeta meta;
     EXPECT_FALSE(handler->stat(activeHashBlobId, &meta));
@@ -170,6 +172,7 @@
 {
     /* the verifyBlobId is available starting at verificationPending. */
     getToVerificationStarted(staticLayoutBlobId);
+    ASSERT_TRUE(handler->canHandleBlob(verifyBlobId));
 
     blobs::BlobMeta meta;
     EXPECT_FALSE(handler->stat(verifyBlobId, &meta));
@@ -186,6 +189,8 @@
     std::vector<std::string> testBlobs = {staticLayoutBlobId, hashBlobId};
     for (const auto& blob : testBlobs)
     {
+        ASSERT_TRUE(handler->canHandleBlob(blob));
+
         blobs::BlobMeta meta = {};
         EXPECT_TRUE(handler->stat(blob, &meta));
         EXPECT_EQ(expected, meta);