mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +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
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/envconfig.h>
|
||||
#include <ripple/app/tx/apply.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/json/json_reader.h>
|
||||
@@ -164,14 +165,12 @@ struct Regression_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Autofilled fee should use the escalated fee");
|
||||
using namespace jtx;
|
||||
Env env(*this, []()
|
||||
Env env(*this, envconfig([](std::unique_ptr<Config> cfg)
|
||||
{
|
||||
auto p = std::make_unique<Config>();
|
||||
setupConfigForUnitTests(*p);
|
||||
auto& section = p->section("transaction_queue");
|
||||
section.set("minimum_txn_in_ledger_standalone", "3");
|
||||
return p;
|
||||
}(),
|
||||
cfg->section("transaction_queue")
|
||||
.set("minimum_txn_in_ledger_standalone", "3");
|
||||
return cfg;
|
||||
}),
|
||||
features(featureFeeEscalation));
|
||||
Env_ss envs(env);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user