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
@@ -26,6 +26,7 @@
|
||||
#include <ripple/protocol/Feature.h>
|
||||
#include <ripple/rpc/impl/TransactionSign.h>
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/envconfig.h>
|
||||
#include <ripple/beast/unit_test.h>
|
||||
|
||||
namespace ripple {
|
||||
@@ -1934,15 +1935,14 @@ public:
|
||||
|
||||
void testAutoFillEscalatedFees ()
|
||||
{
|
||||
test::jtx::Env env(*this, []()
|
||||
using namespace test::jtx;
|
||||
Env env {*this, envconfig([](std::unique_ptr<Config> cfg)
|
||||
{
|
||||
auto p = std::make_unique<Config>();
|
||||
test::setupConfigForUnitTests(*p);
|
||||
auto& section = p->section("transaction_queue");
|
||||
section.set("minimum_txn_in_ledger_standalone", "3");
|
||||
return p;
|
||||
}(),
|
||||
test::jtx::features(featureFeeEscalation));
|
||||
cfg->section("transaction_queue")
|
||||
.set("minimum_txn_in_ledger_standalone", "3");
|
||||
return cfg;
|
||||
}),
|
||||
test::jtx::features(featureFeeEscalation)};
|
||||
LoadFeeTrack const& feeTrack = env.app().getFeeTrack();
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user