mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Signal error for incorrect configuration during unit test
This commit is contained in:
@@ -34,16 +34,19 @@ struct AccountTxPaging_test : beast::unit_test::suite
|
|||||||
void
|
void
|
||||||
run() override
|
run() override
|
||||||
{
|
{
|
||||||
std::string fixturesPath = std::getenv("TEST_FIXTURES");
|
std::string data_path;
|
||||||
|
|
||||||
if (fixturesPath.empty ())
|
if (auto const fixtures = std::getenv("TEST_FIXTURES"))
|
||||||
|
data_path = fixtures;
|
||||||
|
|
||||||
|
if (data_path.empty ())
|
||||||
{
|
{
|
||||||
fail("TEST_FIXTURES environment var not declared");
|
fail("The 'TEST_FIXTURES' environment variable is empty.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DatabaseCon::Setup dbConf;
|
DatabaseCon::Setup dbConf;
|
||||||
dbConf.dataDir = fixturesPath + "/";
|
dbConf.dataDir = data_path + "/";
|
||||||
|
|
||||||
db_ = std::make_unique <DatabaseCon> (
|
db_ = std::make_unique <DatabaseCon> (
|
||||||
dbConf, "account-tx-transactions.db", nullptr, 0);
|
dbConf, "account-tx-transactions.db", nullptr, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user