mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 23:55:52 +00:00
feat: ETLng publisher and service refactoring (#2138)
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
//==============================================================================
|
||||
|
||||
#include "etlng/Models.hpp"
|
||||
#include "etlng/impl/CacheUpdater.hpp"
|
||||
#include "etlng/impl/ext/Cache.hpp"
|
||||
#include "util/BinaryTestObject.hpp"
|
||||
#include "util/LoggerFixtures.hpp"
|
||||
#include "util/MockLedgerCache.hpp"
|
||||
#include "util/MockPrometheus.hpp"
|
||||
#include "util/TestObject.hpp"
|
||||
@@ -27,6 +29,7 @@
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -56,10 +59,11 @@ createTestData()
|
||||
|
||||
} // namespace
|
||||
|
||||
struct CacheExtTests : util::prometheus::WithPrometheus {
|
||||
struct CacheExtTests : NoLoggerFixture, util::prometheus::WithPrometheus {
|
||||
protected:
|
||||
MockLedgerCache cache_;
|
||||
etlng::impl::CacheExt ext_{cache_};
|
||||
std::shared_ptr<etlng::impl::CacheUpdater> updater_ = std::make_shared<etlng::impl::CacheUpdater>(cache_);
|
||||
etlng::impl::CacheExt ext_{updater_};
|
||||
};
|
||||
|
||||
TEST_F(CacheExtTests, OnLedgerDataUpdatesCache)
|
||||
@@ -89,3 +93,8 @@ TEST_F(CacheExtTests, OnInitialObjectsUpdateCache)
|
||||
|
||||
ext_.onInitialObjects(kSEQ, objects, kUNUSED_LAST_KEY);
|
||||
}
|
||||
|
||||
TEST_F(CacheExtTests, AllowInReadonlyReturnsTrue)
|
||||
{
|
||||
EXPECT_TRUE(ext_.allowInReadonly());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user