Forward api_version 1 requests to rippled (#716)

Fixes #698
This commit is contained in:
Alex Kremer
2023-06-26 09:52:57 +01:00
committed by GitHub
parent d9e89746a4
commit aadd9e50f0
9 changed files with 491 additions and 138 deletions

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
/*
This file is part of clio: https://github.com/XRPLF/clio
Copyright (c) 2023, the clio developers.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#pragma once
#include <rpc/common/AnyHandler.h>
#include <rpc/common/Types.h>
#include <gmock/gmock.h>
struct MockHandlerProvider : public RPC::HandlerProvider
{
public:
MOCK_METHOD(bool, contains, (std::string const&), (const, override));
MOCK_METHOD(std::optional<RPC::AnyHandler>, getHandler, (std::string const&), (const, override));
MOCK_METHOD(bool, isClioOnly, (std::string const&), (const, override));
};