mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 15:45:52 +00:00
There is an issue found in the new web server, so we couldn't use it by
default for now.
This reverts commit b3f3259b14.
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "web/Connection.hpp"
|
||||
#include "web/Error.hpp"
|
||||
#include "web/Request.hpp"
|
||||
#include "web/Response.hpp"
|
||||
#include "web/impl/HttpConnection.hpp"
|
||||
#include "web/ng/Connection.hpp"
|
||||
#include "web/ng/Error.hpp"
|
||||
#include "web/ng/Request.hpp"
|
||||
#include "web/ng/Response.hpp"
|
||||
#include "web/ng/impl/HttpConnection.hpp"
|
||||
|
||||
#include <boost/asio/spawn.hpp>
|
||||
#include <boost/asio/ssl/context.hpp>
|
||||
@@ -33,25 +33,25 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
struct MockConnectionMetadataImpl : web::ConnectionMetadata {
|
||||
using web::ConnectionMetadata::ConnectionMetadata;
|
||||
struct MockConnectionMetadataImpl : web::ng::ConnectionMetadata {
|
||||
using web::ng::ConnectionMetadata::ConnectionMetadata;
|
||||
MOCK_METHOD(bool, wasUpgraded, (), (const, override));
|
||||
};
|
||||
|
||||
using MockConnectionMetadata = testing::NiceMock<MockConnectionMetadataImpl>;
|
||||
using StrictMockConnectionMetadata = testing::StrictMock<MockConnectionMetadataImpl>;
|
||||
|
||||
struct MockConnectionImpl : web::Connection {
|
||||
using web::Connection::Connection;
|
||||
struct MockConnectionImpl : web::ng::Connection {
|
||||
using web::ng::Connection::Connection;
|
||||
|
||||
MOCK_METHOD(bool, wasUpgraded, (), (const, override));
|
||||
|
||||
MOCK_METHOD(void, setTimeout, (std::chrono::steady_clock::duration), (override));
|
||||
|
||||
using SendReturnType = std::optional<web::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::Response, boost::asio::yield_context), (override));
|
||||
using SendReturnType = std::optional<web::ng::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::ng::Response, boost::asio::yield_context), (override));
|
||||
|
||||
using ReceiveReturnType = std::expected<web::Request, web::Error>;
|
||||
using ReceiveReturnType = std::expected<web::ng::Request, web::ng::Error>;
|
||||
MOCK_METHOD(ReceiveReturnType, receive, (boost::asio::yield_context), (override));
|
||||
|
||||
MOCK_METHOD(void, close, (boost::asio::yield_context), (override));
|
||||
@@ -21,11 +21,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/Taggable.hpp"
|
||||
#include "web/Connection.hpp"
|
||||
#include "web/Error.hpp"
|
||||
#include "web/Request.hpp"
|
||||
#include "web/Response.hpp"
|
||||
#include "web/impl/HttpConnection.hpp"
|
||||
#include "web/ng/Connection.hpp"
|
||||
#include "web/ng/Error.hpp"
|
||||
#include "web/ng/Request.hpp"
|
||||
#include "web/ng/Response.hpp"
|
||||
#include "web/ng/impl/HttpConnection.hpp"
|
||||
|
||||
#include <boost/asio/spawn.hpp>
|
||||
#include <boost/asio/ssl/context.hpp>
|
||||
@@ -37,15 +37,15 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
struct MockHttpConnectionImpl : web::impl::UpgradableConnection {
|
||||
struct MockHttpConnectionImpl : web::ng::impl::UpgradableConnection {
|
||||
using UpgradableConnection::UpgradableConnection;
|
||||
|
||||
MOCK_METHOD(bool, wasUpgraded, (), (const, override));
|
||||
|
||||
MOCK_METHOD(void, setTimeout, (std::chrono::steady_clock::duration), (override));
|
||||
|
||||
using SendReturnType = std::optional<web::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::Response, boost::asio::yield_context), (override));
|
||||
using SendReturnType = std::optional<web::ng::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::ng::Response, boost::asio::yield_context), (override));
|
||||
|
||||
MOCK_METHOD(
|
||||
SendReturnType,
|
||||
@@ -54,15 +54,15 @@ struct MockHttpConnectionImpl : web::impl::UpgradableConnection {
|
||||
(override)
|
||||
);
|
||||
|
||||
using ReceiveReturnType = std::expected<web::Request, web::Error>;
|
||||
using ReceiveReturnType = std::expected<web::ng::Request, web::ng::Error>;
|
||||
MOCK_METHOD(ReceiveReturnType, receive, (boost::asio::yield_context), (override));
|
||||
|
||||
MOCK_METHOD(void, close, (boost::asio::yield_context), (override));
|
||||
|
||||
using IsUpgradeRequestedReturnType = std::expected<bool, web::Error>;
|
||||
using IsUpgradeRequestedReturnType = std::expected<bool, web::ng::Error>;
|
||||
MOCK_METHOD(IsUpgradeRequestedReturnType, isUpgradeRequested, (boost::asio::yield_context), (override));
|
||||
|
||||
using UpgradeReturnType = std::expected<web::ConnectionPtr, web::Error>;
|
||||
using UpgradeReturnType = std::expected<web::ng::ConnectionPtr, web::ng::Error>;
|
||||
using OptionalSslContext = std::optional<boost::asio::ssl::context>;
|
||||
MOCK_METHOD(
|
||||
UpgradeReturnType,
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "web/Connection.hpp"
|
||||
#include "web/Error.hpp"
|
||||
#include "web/Request.hpp"
|
||||
#include "web/Response.hpp"
|
||||
#include "web/impl/WsConnection.hpp"
|
||||
#include "web/ng/Connection.hpp"
|
||||
#include "web/ng/Error.hpp"
|
||||
#include "web/ng/Request.hpp"
|
||||
#include "web/ng/Response.hpp"
|
||||
#include "web/ng/impl/WsConnection.hpp"
|
||||
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/spawn.hpp>
|
||||
@@ -34,22 +34,22 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
struct MockWsConnectionImpl : web::impl::WsConnectionBase {
|
||||
struct MockWsConnectionImpl : web::ng::impl::WsConnectionBase {
|
||||
using WsConnectionBase::WsConnectionBase;
|
||||
|
||||
MOCK_METHOD(bool, wasUpgraded, (), (const, override));
|
||||
|
||||
MOCK_METHOD(void, setTimeout, (std::chrono::steady_clock::duration), (override));
|
||||
|
||||
using SendReturnType = std::optional<web::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::Response, boost::asio::yield_context), (override));
|
||||
using SendReturnType = std::optional<web::ng::Error>;
|
||||
MOCK_METHOD(SendReturnType, send, (web::ng::Response, boost::asio::yield_context), (override));
|
||||
|
||||
using ReceiveReturnType = std::expected<web::Request, web::Error>;
|
||||
using ReceiveReturnType = std::expected<web::ng::Request, web::ng::Error>;
|
||||
MOCK_METHOD(ReceiveReturnType, receive, (boost::asio::yield_context), (override));
|
||||
|
||||
MOCK_METHOD(void, close, (boost::asio::yield_context), (override));
|
||||
|
||||
using SendBufferReturnType = std::optional<web::Error>;
|
||||
using SendBufferReturnType = std::optional<web::ng::Error>;
|
||||
MOCK_METHOD(SendBufferReturnType, sendBuffer, (boost::asio::const_buffer, boost::asio::yield_context), (override));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user