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
@@ -35,7 +35,6 @@
|
||||
#include <ripple/app/misc/TxQ.h>
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/basics/Slice.h>
|
||||
#include <ripple/core/ConfigSections.h>
|
||||
#include <ripple/json/to_string.h>
|
||||
#include <ripple/net/HTTPClient.h>
|
||||
#include <ripple/net/RPCCall.h>
|
||||
@@ -54,33 +53,6 @@
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
|
||||
void
|
||||
setupConfigForUnitTests (Config& cfg)
|
||||
{
|
||||
cfg.overwrite (ConfigSection::nodeDatabase (), "type", "memory");
|
||||
cfg.overwrite (ConfigSection::nodeDatabase (), "path", "main");
|
||||
cfg.deprecatedClearSection (ConfigSection::importNodeDatabase ());
|
||||
cfg.legacy("database_path", "");
|
||||
cfg.setupControl(true, true, true);
|
||||
cfg["server"].append("port_peer");
|
||||
cfg["port_peer"].set("ip", "127.0.0.1");
|
||||
cfg["port_peer"].set("port", "8080");
|
||||
cfg["port_peer"].set("protocol", "peer");
|
||||
cfg["server"].append("port_rpc");
|
||||
cfg["port_rpc"].set("ip", "127.0.0.1");
|
||||
cfg["port_rpc"].set("port", "8081");
|
||||
cfg["port_rpc"].set("protocol", "http,ws2");
|
||||
cfg["port_rpc"].set("admin", "127.0.0.1");
|
||||
cfg["server"].append("port_ws");
|
||||
cfg["port_ws"].set("ip", "127.0.0.1");
|
||||
cfg["port_ws"].set("port", "8082");
|
||||
cfg["port_ws"].set("protocol", "ws");
|
||||
cfg["port_ws"].set("admin", "127.0.0.1");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace jtx {
|
||||
|
||||
class SuiteSink : public beast::Journal::Sink
|
||||
|
||||
Reference in New Issue
Block a user