diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-07-20 18:13:48 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-07-20 18:13:48 +0200 |
commit | 430bb0624ae60e78c3e9855bd7827cc407471871 (patch) | |
tree | d35009892e5c07069e112fe36735f4832df32b12 /src/testing/testing_api_cmd_common.c | |
parent | c424cf99abf8caae1106fe778c251aa469e0a308 (diff) |
[age-withdraw] Added testing commands for age-withdraw and -reveal
Implemented
- TALER_TESTING_cmd_age_withdraw
- TALER_TESTING_cmd_age_withdraw_reveal
Note: No test is using those commands yet.
Diffstat (limited to 'src/testing/testing_api_cmd_common.c')
-rw-r--r-- | src/testing/testing_api_cmd_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_common.c b/src/testing/testing_api_cmd_common.c index 91138f36..2c29f4ec 100644 --- a/src/testing/testing_api_cmd_common.c +++ b/src/testing/testing_api_cmd_common.c @@ -59,6 +59,20 @@ TALER_TESTING_history_entry_cmp ( that should be good enough. */ return 0; return 1; + case TALER_EXCHANGE_RTT_AGEWITHDRAWAL: + /* testing_api_cmd_age_withdraw doesn't set the out_authorization_sig, + so we cannot test for it here. but if the amount matches, + that should be good enough. */ + if ( (0 == + TALER_amount_cmp (&h1->amount, + &h2->amount)) && + (0 == + TALER_amount_cmp (&h1->details.age_withdraw.fee, + &h2->details.age_withdraw.fee)) && + (h1->details.age_withdraw.max_age == + h2->details.age_withdraw.max_age)) + return 0; + return 1; case TALER_EXCHANGE_RTT_RECOUP: /* exchange_sig, exchange_pub and timestamp are NOT available from the original recoup response, hence here NOT check(able/ed) */ |