test: firmware verificationCompleted: commit

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I929fdc480b127dcda4b80b9a4d7153ce5cc8f5f4
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 57fd24d..0f08ee7 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -554,16 +554,20 @@
         return false;
     }
 
-    /* Calling repeatedly has no effect within an update process. */
-    if (state == UpdateState::verificationStarted)
+    switch (state)
     {
-        return true;
+        case UpdateState::verificationStarted:
+            /* Calling repeatedly has no effect within an update process. */
+            return true;
+        case UpdateState::verificationCompleted:
+            /* Calling after the verification process has completed returns
+             * failure. */
+            return false;
+        default:
+            /* Set state to committing. */
+            item->second->flags |= blobs::StateFlags::committing;
+            return triggerVerification();
     }
-
-    /* Set state to committing. */
-    item->second->flags |= blobs::StateFlags::committing;
-
-    return triggerVerification();
 }
 
 /*