mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-21 11:05:51 +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
@@ -27,17 +27,6 @@ namespace ripple {
|
||||
|
||||
class LedgerRPC_test : public beast::unit_test::suite
|
||||
{
|
||||
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
|
||||
checkErrorValue(
|
||||
Json::Value const& jv,
|
||||
@@ -184,7 +173,7 @@ class LedgerRPC_test : public beast::unit_test::suite
|
||||
testcase("Ledger Request, Full Option Without Admin");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env { *this, makeNonAdminConfig() };
|
||||
Env env { *this, envconfig(no_admin) };
|
||||
|
||||
env.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user