quiesce: use entry id for interface
Extension code does not have the Entry object as an input parameter. The
quiesce interface should not require an Entry object. Refactor the code
a bit to allow for this.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5caee881dae3d6c22f4f619af5acd3e3e33379aa
diff --git a/test/elog_quiesce_test.cpp b/test/elog_quiesce_test.cpp
index 4675073..8ec17d3 100644
--- a/test/elog_quiesce_test.cpp
+++ b/test/elog_quiesce_test.cpp
@@ -81,31 +81,6 @@
EXPECT_EQ(manager.isCalloutPresent(elog), true);
}
-// Test that no blocking errors are created when no callout
-TEST_F(TestQuiesceOnError, testNoBlockingErrorsCreated)
-{
- uint32_t id = 99;
- uint64_t timestamp{100};
- std::string message{"test error"};
- std::string fwLevel{"level42"};
- std::vector<std::string> testData{"no", "callout"};
- phosphor::logging::AssociationList associations{};
-
- Entry elog{mockedBus,
- std::string(OBJ_ENTRY) + '/' + std::to_string(id),
- id,
- timestamp,
- Entry::Level::Informational,
- std::move(message),
- std::move(testData),
- std::move(associations),
- fwLevel,
- manager};
-
- manager.checkQuiesceOnError(elog);
- EXPECT_EQ(manager.getBlockingErrSize(), 0);
-}
-
// Test that a blocking error is created on entry with callout
TEST_F(TestQuiesceOnError, testBlockingErrorsCreated)
{
@@ -140,7 +115,7 @@
fwLevel,
manager};
- manager.checkQuiesceOnError(elog);
+ manager.quiesceOnError(id);
// Created error with callout so expect a blocking error now
EXPECT_EQ(manager.getBlockingErrSize(), 1);
@@ -195,7 +170,7 @@
fwLevel,
manager};
- manager.checkQuiesceOnError(elog);
+ manager.quiesceOnError(id);
// Created error with callout so expect a blocking error now
EXPECT_EQ(manager.getBlockingErrSize(), 1);
// Also should have a callback create looking for entry to be resolved