aboutsummaryrefslogtreecommitdiff
path: root/src/lib/test_bank_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-15 22:09:39 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-15 22:09:39 +0100
commit16a6d39dc94eccf60f25e5abfaeb6c313e39c39a (patch)
tree4fb7e2a1b4b51b366003cc3a6fa1c6fd1773913e /src/lib/test_bank_api.c
parent7236294ffbe7b5a5b3d56a27c1685ac75cdfd76b (diff)
simplify bank history commands
Diffstat (limited to 'src/lib/test_bank_api.c')
-rw-r--r--src/lib/test_bank_api.c106
1 files changed, 55 insertions, 51 deletions
diff --git a/src/lib/test_bank_api.c b/src/lib/test_bank_api.c
index 0ae77353f..21dbe74b5 100644
--- a/src/lib/test_bank_api.c
+++ b/src/lib/test_bank_api.c
@@ -63,58 +63,62 @@ run (void *cls,
struct TALER_TESTING_Interpreter *is)
{
struct TALER_WireTransferIdentifierRawP wtid;
+
memset (&wtid, 42, sizeof (wtid));
- struct TALER_TESTING_Command commands[] = {
- TALER_TESTING_cmd_bank_credits ("history-0",
- bc.exchange_account_url,
- &bc.exchange_auth,
- NULL,
- 1),
- TALER_TESTING_cmd_admin_add_incoming ("debit-1",
- "KUDOS:5.01",
- bc.exchange_account_url,
- &bc.exchange_auth,
- bc.user42_payto),
- TALER_TESTING_cmd_bank_credits ("history-1c",
- bc.exchange_account_url,
- &bc.exchange_auth,
- NULL,
- 5),
- TALER_TESTING_cmd_bank_debits ("history-1d",
- bc.exchange_account_url,
- &bc.exchange_auth,
- NULL,
- 5),
- TALER_TESTING_cmd_admin_add_incoming ("debit-2",
- "KUDOS:3.21",
- bc.exchange_account_url,
- &bc.exchange_auth,
- bc.user42_payto),
- TALER_TESTING_cmd_transfer ("credit-2",
- "KUDOS:3.22",
- bc.exchange_account_url,
- &bc.exchange_auth,
- bc.user42_payto,
- &wtid,
- "http://exchange.example.com/"),
- TALER_TESTING_cmd_bank_debits ("history-2b",
- bc.exchange_account_url,
- &bc.exchange_auth,
- NULL,
- 5),
- TALER_TESTING_cmd_end ()
- };
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Bank serves at `%s'\n",
- bc.bank_url);
- if (GNUNET_YES == with_fakebank)
- TALER_TESTING_run_with_fakebank (is,
- commands,
- bc.bank_url);
- else
- TALER_TESTING_run (is,
- commands);
+
+ {
+ struct TALER_TESTING_Command commands[] = {
+ TALER_TESTING_cmd_bank_credits ("history-0",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ NULL,
+ 1),
+ TALER_TESTING_cmd_admin_add_incoming ("debit-1",
+ "KUDOS:5.01",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ bc.user42_payto),
+ TALER_TESTING_cmd_bank_credits ("history-1c",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ NULL,
+ 5),
+ TALER_TESTING_cmd_bank_debits ("history-1d",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ NULL,
+ 5),
+ TALER_TESTING_cmd_admin_add_incoming ("debit-2",
+ "KUDOS:3.21",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ bc.user42_payto),
+ TALER_TESTING_cmd_transfer ("credit-2",
+ "KUDOS:3.22",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ bc.user42_payto,
+ &wtid,
+ "http://exchange.example.com/"),
+ TALER_TESTING_cmd_bank_debits ("history-2b",
+ bc.exchange_account_url,
+ &bc.exchange_auth,
+ NULL,
+ 5),
+ TALER_TESTING_cmd_end ()
+ };
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Bank serves at `%s'\n",
+ bc.bank_url);
+ if (GNUNET_YES == with_fakebank)
+ TALER_TESTING_run_with_fakebank (is,
+ commands,
+ bc.bank_url);
+ else
+ TALER_TESTING_run (is,
+ commands);
+ }
}