blob: c748f7fb3ec875d874a5bbb115b3a07f355a8fba [file] [log] [blame]
#include "flags.hpp"
#include "image_mock.hpp"
#include "triggerable_mock.hpp"
#include "util.hpp"
#include "version_handler.hpp"
#include <array>
#include <string>
#include <vector>
#include <gtest/gtest.h>
namespace ipmi_flash
{
TEST(VersionHandlerCanHandleTest, VerifyGoodInfoMapPasses)
{
VersionInfoMap test;
std::array blobNames{"blob0", "blob1", "blob2", "blob3"};
for (const auto& blobName : blobNames)
{
test.try_emplace(blobName,
VersionInfoPack(blobName,
std::make_unique<VersionActionPack>(
CreateTriggerMock()),
CreateImageMock()));
}
auto handler = VersionBlobHandler::create(std::move(test));
EXPECT_NE(handler, nullptr);
}
} // namespace ipmi_flash