mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
feat: Integrate new webserver (#1722)
For #919. The new web server is not using dosguard yet. It will be fixed by a separate PR.
This commit is contained in:
@@ -34,22 +34,7 @@ template <template <typename> typename MockType = ::testing::NiceMock>
|
||||
struct HandlerBaseTestBase : util::prometheus::WithPrometheus,
|
||||
MockBackendTestBase<MockType>,
|
||||
SyncAsioContextTest,
|
||||
MockETLServiceTestBase<MockType> {
|
||||
protected:
|
||||
void
|
||||
SetUp() override
|
||||
{
|
||||
SyncAsioContextTest::SetUp();
|
||||
MockETLServiceTestBase<MockType>::SetUp();
|
||||
}
|
||||
|
||||
void
|
||||
TearDown() override
|
||||
{
|
||||
MockETLServiceTestBase<MockType>::TearDown();
|
||||
SyncAsioContextTest::TearDown();
|
||||
}
|
||||
};
|
||||
MockETLServiceTestBase<MockType> {};
|
||||
|
||||
/**
|
||||
* @brief Fixture with a "nice" backend mock and an embedded boost::asio context.
|
||||
|
||||
@@ -21,20 +21,25 @@
|
||||
|
||||
#include "util/Taggable.hpp"
|
||||
#include "util/config/Config.hpp"
|
||||
#include "web/SubscriptionContextInterface.hpp"
|
||||
#include "web/interface/ConnectionBase.hpp"
|
||||
|
||||
#include <boost/beast/http/status.hpp>
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
struct MockSession : public web::ConnectionBase {
|
||||
struct MockSession : public web::SubscriptionContextInterface {
|
||||
MOCK_METHOD(void, send, (std::shared_ptr<std::string>), (override));
|
||||
MOCK_METHOD(void, send, (std::string&&, boost::beast::http::status), (override));
|
||||
MOCK_METHOD(void, onDisconnect, (OnDisconnectSlot const&), (override));
|
||||
MOCK_METHOD(void, setApiSubversion, (uint32_t), (override));
|
||||
MOCK_METHOD(uint32_t, apiSubversion, (), (const, override));
|
||||
|
||||
util::TagDecoratorFactory tagDecoratorFactory{util::Config{}};
|
||||
|
||||
MockSession() : web::ConnectionBase(tagDecoratorFactory, "")
|
||||
MockSession() : web::SubscriptionContextInterface(tagDecoratorFactory)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <boost/asio/ssl/stream_base.hpp>
|
||||
#include <boost/asio/ssl/verify_context.hpp>
|
||||
#include <boost/asio/ssl/verify_mode.hpp>
|
||||
#include <boost/beast/core/buffers_to_string.hpp>
|
||||
#include <boost/beast/core/error.hpp>
|
||||
#include <boost/beast/core/flat_buffer.hpp>
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
|
||||
Reference in New Issue
Block a user