oem: ibm: Fix UT case ConfigNotExit
This case checks a log to indicate FileTable is not created. It
will triger a CI failure with the latest ci-scripts:
[ RUN ] FileTable.ConfigNotExist
../oem/ibm/test/libpldmresponder_fileio_test.cpp:458: Failure
Expected equality of these values:
logs.size()
Which is: 0
1
[ FAILED ] FileTable.ConfigNotExist (1 ms)
Change it to check FileTable::isEmpty().
Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I2ff0d588d7784e7d2828468d61cb1851140596e2
diff --git a/oem/ibm/test/libpldmresponder_fileio_test.cpp b/oem/ibm/test/libpldmresponder_fileio_test.cpp
index 83b0cc0..3ebf96a 100644
--- a/oem/ibm/test/libpldmresponder_fileio_test.cpp
+++ b/oem/ibm/test/libpldmresponder_fileio_test.cpp
@@ -12,28 +12,6 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#define SD_JOURNAL_SUPPRESS_LOCATION
-
-#include <systemd/sd-journal.h>
-
-std::vector<std::string> logs;
-
-extern "C" {
-
-int sd_journal_send(const char* format, ...)
-{
- logs.push_back(format);
- return 0;
-}
-
-int sd_journal_send_with_location(const char* /*file*/, const char* /*line*/,
- const char* /*func*/, const char* format, ...)
-{
- logs.push_back(format);
- return 0;
-}
-}
-
namespace fs = std::filesystem;
using Json = nlohmann::json;
using namespace pldm::filetable;
@@ -453,9 +431,8 @@
TEST(FileTable, ConfigNotExist)
{
- logs.clear();
FileTable tableObj("");
- EXPECT_EQ(logs.size(), 1);
+ EXPECT_EQ(tableObj.isEmpty(), true);
}
TEST_F(TestFileTable, ValidateFileEntry)