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
@@ -1410,16 +1410,7 @@ public:
|
||||
{
|
||||
testcase("BookOffer Limits");
|
||||
using namespace jtx;
|
||||
Env env(*this, [asAdmin]() {
|
||||
auto p = std::make_unique<Config>();
|
||||
setupConfigForUnitTests(*p);
|
||||
if(! asAdmin)
|
||||
{
|
||||
(*p)["port_rpc"].set("admin","");
|
||||
(*p)["port_ws"].set("admin","");
|
||||
}
|
||||
return p;
|
||||
}());
|
||||
Env env {*this, asAdmin ? envconfig() : envconfig(no_admin)};
|
||||
Account gw {"gw"};
|
||||
env.fund(XRP(200000), gw);
|
||||
env.close();
|
||||
|
||||
Reference in New Issue
Block a user