From a57b3a1f91e2339c3dbef304023b1d1177441e48 Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Tue, 21 Nov 2023 15:28:39 +0000 Subject: [PATCH] Add DeliverMax to more JSONRPC tests --- src/test/rpc/JSONRPC_test.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/test/rpc/JSONRPC_test.cpp b/src/test/rpc/JSONRPC_test.cpp index 1e8ce554be3..4272391773e 100644 --- a/src/test/rpc/JSONRPC_test.cpp +++ b/src/test/rpc/JSONRPC_test.cpp @@ -70,14 +70,14 @@ struct TxnTestData static constexpr TxnTestData txnTestArray[] = { - {"Minimal payment.", + {"Minimal payment, no Amount only DeliverMax", __LINE__, R"({ "command": "doesnt_matter", "secret": "masterpassphrase", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", - "Amount": "1000000000", + "DeliverMax": "1000000000", "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", "TransactionType": "Payment" } @@ -87,7 +87,7 @@ static constexpr TxnTestData txnTestArray[] = { "Missing field 'account'.", "Missing field 'tx_json.Sequence'."}}}, - {"Pass in Fee with minimal payment.", + {"Pass in Fee with minimal payment, both Amount and DeliverMax.", __LINE__, R"({ "command": "doesnt_matter", @@ -97,6 +97,7 @@ static constexpr TxnTestData txnTestArray[] = { "Fee": 10, "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "Amount": "1000000000", + "DeliverMax": "1000000000", "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", "TransactionType": "Payment" } @@ -106,7 +107,7 @@ static constexpr TxnTestData txnTestArray[] = { "Missing field 'tx_json.Sequence'.", "Missing field 'tx_json.Sequence'."}}}, - {"Pass in Sequence.", + {"Pass in Sequence, no Amount only DeliverMax", __LINE__, R"({ "command": "doesnt_matter", @@ -115,7 +116,7 @@ static constexpr TxnTestData txnTestArray[] = { "tx_json": { "Sequence": 0, "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", - "Amount": "1000000000", + "DeliverMax": "1000000000", "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", "TransactionType": "Payment" } @@ -125,7 +126,8 @@ static constexpr TxnTestData txnTestArray[] = { "Missing field 'tx_json.Fee'.", "Missing field 'tx_json.SigningPubKey'."}}}, - {"Pass in Sequence and Fee with minimal payment.", + {"Pass in Sequence and Fee with minimal payment, both Amount and " + "DeliverMax.", __LINE__, R"({ "command": "doesnt_matter", @@ -136,6 +138,7 @@ static constexpr TxnTestData txnTestArray[] = { "Fee": 10, "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "Amount": "1000000000", + "DeliverMax": "1000000000", "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", "TransactionType": "Payment" }