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

@@ -40,8 +40,7 @@ class LedgerLoad_test : public beast::unit_test::suite
auto ledgerConfig(std::string const& ledger, Config::StartUpType type)
{
assert(! dbPath_.empty());
auto p = std::make_unique<Config>();
test::setupConfigForUnitTests(*p);
auto p = test::jtx::envconfig();
p->START_LEDGER = ledger;
p->START_UP = type;
p->legacy("database_path", dbPath_.string());