Promote API version 2 to supported (#4803)

* Promote API version 2 to supported

* Switch command line to API version 1

* Fix LedgerRequestRPC test

* Remove obsolete tx_account method

This method is not implemented, the only parts which are removed are related to command-line parsing

* Fix RPCCall test

* Reduce diff size, small test improvements

* Minor fixes

* Support for the mold linker

* [fold] handle case where both mold and gold are installed

* [fold] Use first non-default linker

* Fix TransactionEntry_test

* Fix AccountTx_test

---------

Co-authored-by: seelabs <scott.determan@yahoo.com>
This commit is contained in:
Bronek Kozicki
2023-11-13 23:04:27 +00:00
committed by GitHub
parent 4cb0bcb003
commit ac27089c69
9 changed files with 347 additions and 643 deletions

View File

@@ -24,6 +24,8 @@
#include <ripple/rpc/impl/RPCHelpers.h>
#include <test/jtx.h>
#include <functional>
namespace ripple {
namespace RPC {
@@ -263,7 +265,7 @@ public:
}
void
testBadInput()
testBadInput(unsigned apiVersion)
{
using namespace test::jtx;
Env env{*this};
@@ -287,9 +289,9 @@ public:
// the purpose in this test is to force the ledger expiration/out of
// date check to trigger
env.timeKeeper().adjustCloseTime(weeks{3});
result = env.rpc("ledger_request", "1")[jss::result];
result = env.rpc(apiVersion, "ledger_request", "1")[jss::result];
BEAST_EXPECT(result[jss::status] == "error");
if (RPC::apiMaximumSupportedVersion == 1)
if (apiVersion == 1)
{
BEAST_EXPECT(result[jss::error] == "noCurrent");
BEAST_EXPECT(
@@ -357,7 +359,8 @@ public:
{
testLedgerRequest();
testEvolution();
testBadInput();
test::jtx::forAllApiVersions(
std::bind_front(&LedgerRequestRPC_test::testBadInput, this));
testMoreThan256Closed();
testNonAdmin();
}