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:
Mike Ellery
2017-02-07 12:00:24 -08:00
committed by Scott Schurr
parent 09a1d1a593
commit 80d9b0464a
22 changed files with 304 additions and 249 deletions

View File

@@ -32,14 +32,7 @@ public:
{
testcase << "Overload " << (useWS ? "WS" : "HTTP") << " RPC client";
using namespace jtx;
Env env(*this, []()
{
auto p = std::make_unique<Config>();
setupConfigForUnitTests(*p);
(*p)["port_rpc"].set("admin","");
(*p)["port_ws"].set("admin","");
return p;
}());
Env env {*this, envconfig(no_admin)};
Account const alice {"alice"};
Account const bob {"bob"};