mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add helper to modify Env configs (RIPD-1247)
Add envconfig test helper for manipulating Env config via callables. Create new common modifiers for non-admin config, validator config and one for using different server port values.
This commit is contained in:
committed by
Scott Schurr
parent
09a1d1a593
commit
80d9b0464a
@@ -32,17 +32,6 @@ class LedgerRequestRPC_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
|
||||
static
|
||||
std::unique_ptr<Config>
|
||||
makeNonAdminConfig()
|
||||
{
|
||||
auto p = std::make_unique<Config>();
|
||||
test::setupConfigForUnitTests(*p);
|
||||
(*p)["port_rpc"].set("admin","");
|
||||
(*p)["port_ws"].set("admin","");
|
||||
return p;
|
||||
}
|
||||
|
||||
void testLedgerRequest()
|
||||
{
|
||||
using namespace test::jtx;
|
||||
@@ -288,7 +277,7 @@ public:
|
||||
void testNonAdmin()
|
||||
{
|
||||
using namespace test::jtx;
|
||||
Env env { *this, makeNonAdminConfig() };
|
||||
Env env { *this, envconfig(no_admin) };
|
||||
Account const gw { "gateway" };
|
||||
auto const USD = gw["USD"];
|
||||
env.fund(XRP(100000), gw);
|
||||
|
||||
Reference in New Issue
Block a user