bmc: notYetStarted: deleteBlob(blob)

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ife38bd62fd5666783066f0d8f4afeb3a6e3760bf
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index a402327..172281c 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -114,6 +114,22 @@
         return false;
     }
 
+    /* only includes states where fileOpen == false */
+    switch (state)
+    {
+        case UpdateState::notYetStarted:
+            /* Trying to delete anything at this point has no effect and returns
+             * false.
+             */
+            return false;
+        case UpdateState::verificationPending:
+            break;
+        case UpdateState::updatePending:
+            break;
+        default:
+            break;
+    }
+
     /* TODO: implement. */
     return false;
 }
diff --git a/test/firmware_state_notyetstarted_unittest.cpp b/test/firmware_state_notyetstarted_unittest.cpp
index bb6fecf..3b66b7a 100644
--- a/test/firmware_state_notyetstarted_unittest.cpp
+++ b/test/firmware_state_notyetstarted_unittest.cpp
@@ -41,6 +41,18 @@
  * returned by getBlobIds.  It is tested in firmware_canhandle_unittest
  */
 
+/*
+ * deleteBlob()
+ */
+TEST_F(FirmwareHandlerNotYetStartedTest, DeleteBlobInStateReturnsFalse)
+{
+    auto blobs = handler->getBlobIds();
+    for (const auto& b : blobs)
+    {
+        EXPECT_FALSE(handler->deleteBlob(b));
+    }
+}
+
 /* canHandleBlob, getBlobIds */
 TEST_F(FirmwareHandlerNotYetStartedTest, GetBlobListValidateListContents)
 {