mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Isolate Application object in Env:
This change causes each instance of Env to construct its own isolated Application object for testing. Also included is part of a framework to create multiple Application objects in the same unit test and connect them together.
This commit is contained in:
@@ -49,7 +49,7 @@ struct Regression_test : public beast::unit_test::suite
|
||||
// be reproduced against an open ledger. Make a local
|
||||
// closed ledger and work with it directly.
|
||||
auto closed = std::make_shared<Ledger>(
|
||||
create_genesis, env.config, env.app().family());
|
||||
create_genesis, env.app().config(), env.app().family());
|
||||
auto expectedDrops = SYSTEM_CURRENCY_START;
|
||||
expect(closed->info().drops == expectedDrops);
|
||||
|
||||
@@ -67,7 +67,7 @@ struct Regression_test : public beast::unit_test::suite
|
||||
|
||||
auto const result = ripple::apply(env.app(),
|
||||
accum, *jt.stx, tapENABLE_TESTING,
|
||||
directSigVerify, env.config,
|
||||
directSigVerify, env.app().config(),
|
||||
env.journal);
|
||||
expect(result.first == tesSUCCESS);
|
||||
expect(result.second);
|
||||
@@ -95,7 +95,7 @@ struct Regression_test : public beast::unit_test::suite
|
||||
|
||||
auto const result = ripple::apply(env.app(),
|
||||
accum, *jt.stx, tapENABLE_TESTING,
|
||||
directSigVerify, env.config,
|
||||
directSigVerify, env.app().config(),
|
||||
env.journal);
|
||||
expect(result.first == tecINSUFF_FEE);
|
||||
expect(result.second);
|
||||
|
||||
Reference in New Issue
Block a user