mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 14:50:54 +00:00
test: Env unit test RPC errors return a unique result: (#4877)
* telENV_RPC_FAILED is a new code, reserved exclusively for unit tests when RPC fails. This will make those types of errors distinct and easier to test for when expected and/or diagnose when not. * Output RPC command result when result is not expected.
This commit is contained in:
@@ -747,8 +747,9 @@ public:
|
||||
// Force the factor low enough to fail
|
||||
params[jss::fee_mult_max] = 1;
|
||||
params[jss::fee_div_max] = 2;
|
||||
// RPC errors result in temINVALID
|
||||
envs(noop(alice), fee(none), seq(none), ter(temINVALID))(params);
|
||||
// RPC errors result in telENV_RPC_FAILED
|
||||
envs(noop(alice), fee(none), seq(none), ter(telENV_RPC_FAILED))(
|
||||
params);
|
||||
|
||||
auto tx = env.tx();
|
||||
BEAST_EXPECT(!tx);
|
||||
|
||||
Reference in New Issue
Block a user