version-handler: Remove create special cases

Our builder is validated to not pass invalid configurations to the
handler. Since we can guarantee the invariant that we will never
construct handlers with null paramemters, we don't need have extra
checks.

Change-Id: I48d24874298c1c5ead74724921c86ea0a022a53c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/version-handler/main.cpp b/bmc/version-handler/main.cpp
index 7b21152..8946fb3 100644
--- a/bmc/version-handler/main.cpp
+++ b/bmc/version-handler/main.cpp
@@ -65,14 +65,7 @@
             std::fprintf(stderr, "config loaded: %s\n", config.blobId.c_str());
         }
     }
-    auto handler = VersionBlobHandler::create(std::move(handlerMap));
-    if (!handler)
-    {
-        std::fprintf(stderr, "Version Handler has an invalid configuration");
-        return nullptr;
-    }
-
-    return handler;
+    return VersionBlobHandler::create(std::move(handlerMap));
 }
 } // namespace ipmi_flash
 
diff --git a/bmc/version-handler/test/version_createhandler_unittest.cpp b/bmc/version-handler/test/version_createhandler_unittest.cpp
index 8454ed0..c748f7f 100644
--- a/bmc/version-handler/test/version_createhandler_unittest.cpp
+++ b/bmc/version-handler/test/version_createhandler_unittest.cpp
@@ -29,42 +29,4 @@
     EXPECT_NE(handler, nullptr);
 }
 
-TEST(VersionCreateHandlerTest, VerifyEmptyInfoMapFails)
-{
-    VersionInfoMap test;
-    auto handler = VersionBlobHandler::create(std::move(test));
-    EXPECT_EQ(handler, nullptr);
-}
-
-TEST(VersionHandlerCanHandleTest, VerifyInfoMapWithNullActionPackFails)
-{
-    VersionInfoMap test;
-    test.try_emplace("blob0",
-                     VersionInfoPack("blob0", nullptr, CreateImageMock()));
-    auto handler = VersionBlobHandler::create(std::move(test));
-    EXPECT_EQ(handler, nullptr);
-}
-
-TEST(VersionHandlerCanHandleTest, VerifyInfoMapWithNullTriggerableActionFails)
-{
-    VersionInfoMap test;
-    test.try_emplace(
-        "blob0",
-        VersionInfoPack("blob0", std::make_unique<VersionActionPack>(nullptr),
-                        CreateImageMock()));
-    auto handler = VersionBlobHandler::create(std::move(test));
-    EXPECT_EQ(handler, nullptr);
-}
-
-TEST(VersionHandlerCanHandleTest, VerifyInfoMapWithNullImageHandlerFails)
-{
-    VersionInfoMap test;
-    test.try_emplace(
-        "blob0",
-        VersionInfoPack(
-            "blob0", std::make_unique<VersionActionPack>(CreateTriggerMock()),
-            nullptr));
-    auto handler = VersionBlobHandler::create(std::move(test));
-    EXPECT_EQ(handler, nullptr);
-}
 } // namespace ipmi_flash
diff --git a/bmc/version-handler/version_handler.cpp b/bmc/version-handler/version_handler.cpp
index 32b29da..8bf76bd 100644
--- a/bmc/version-handler/version_handler.cpp
+++ b/bmc/version-handler/version_handler.cpp
@@ -6,18 +6,9 @@
 std::unique_ptr<blobs::GenericBlobInterface>
     VersionBlobHandler::create(VersionInfoMap&& versionMap)
 {
-    if (versionMap.empty())
-    {
-        return nullptr;
-    }
     std::vector<std::string> blobList;
     for (const auto& [key, val] : versionMap)
     {
-        if (val.blobId != key || val.actionPack == nullptr ||
-            val.imageHandler == nullptr || val.actionPack->onOpen == nullptr)
-        {
-            return nullptr;
-        }
         blobList.push_back(key);
     }
     return std::make_unique<VersionBlobHandler>(std::move(blobList),