summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib/test_bank_api.c')
-rw-r--r--src/bank-lib/test_bank_api.c96
1 files changed, 17 insertions, 79 deletions
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c
index d577bff95..1dd493bb0 100644
--- a/src/bank-lib/test_bank_api.c
+++ b/src/bank-lib/test_bank_api.c
@@ -16,7 +16,6 @@
License along with TALER; see the file COPYING. If not,
see <http://www.gnu.org/licenses/>
*/
-
/**
* @file bank/test_bank_api.c
* @brief testcase to test bank's HTTP API
@@ -24,7 +23,6 @@
* @author Marcello Stanisci
* @author Christian Grothoff
*/
-
#include "platform.h"
#include "taler_util.h"
#include "taler_signatures.h"
@@ -42,7 +40,6 @@
/**
* Fakebank URL.
*/
-
static char *bank_url;
/**
@@ -67,26 +64,6 @@ static struct GNUNET_OS_Process *bankd;
static int WITH_FAKEBANK;
/**
- * Transfer @a amount from @a src account to @a dst using
- * @a subject and the @a label for the command.
- */
-#define TRANSFER(label,amount,src,dst,subject) \
- TALER_TESTING_cmd_fakebank_transfer_with_subject (label, \
- amount, \
- bank_url, \
- src, \
- dst, \
- AUTHS[src \
- - 1].details.basic. \
- username, \
- AUTHS[src \
- - 1].details.basic. \
- password, \
- subject, \
- "http://exchange.net/")
-
-
-/**
* Main function that will tell the interpreter what commands to
* run.
*
@@ -106,69 +83,30 @@ run (void *cls,
account_url,
payto_url,
NULL,
- NULL,
- "subject 1"),
- TALER_TESTING_cmd_bank_history ("history-1c",
- bank_url,
- TALER_TESTING_BANK_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_CREDIT,
- GNUNET_YES,
- NULL,
- 5),
- TALER_TESTING_cmd_bank_history ("history-1d",
- bank_url,
- TALER_TESTING_BANK_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_DEBIT,
- GNUNET_YES,
+ NULL),
+ TALER_TESTING_cmd_bank_credits ("history-1c",
+ account_url,
NULL,
5),
- TRANSFER ("debit-2",
- "KUDOS:3.21",
- TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER,
- TALER_TESTING_USER_ACCOUNT_NUMBER,
- "subject 2"),
+ TALER_TESTING_cmd_bank_debits ("history-1d",
+ account_url,
+ NULL,
+ 5),
+ TALER_TESTING_cmd_fakebank_transfer ("debit-2",
+ "KUDOS:3.21",
+ account_url,
+ payto_url,
+ NULL,
+ NULL),
TRANSFER ("credit-2",
"KUDOS:3.22",
TALER_TESTING_USER_ACCOUNT_NUMBER,
TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER,
"credit 2"),
- TALER_TESTING_cmd_bank_history ("history-2b",
- bank_url,
- TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_BOTH,
- GNUNET_YES,
- NULL,
- 5),
- TALER_TESTING_cmd_bank_history ("history-2bi",
- bank_url,
- TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_BOTH,
- GNUNET_YES,
- "debit-1",
- 5),
- TRANSFER ("credit-for-reject-1",
- "KUDOS:1.01",
- TALER_TESTING_BANK_ACCOUNT_NUMBER,
- TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER,
- "subject 3"),
- TALER_TESTING_cmd_bank_reject ("reject-1",
- bank_url,
- "credit-for-reject-1"),
- TALER_TESTING_cmd_bank_history ("history-r1",
- bank_url,
- TALER_TESTING_BANK_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_BOTH,
- GNUNET_YES,
- NULL,
- 5),
- TALER_TESTING_cmd_bank_history ("history-r1c",
- bank_url,
- TALER_TESTING_BANK_ACCOUNT_NUMBER,
- TALER_BANK_DIRECTION_BOTH
- | TALER_BANK_DIRECTION_CANCEL,
- GNUNET_YES,
- NULL,
- 5),
+ TALER_TESTING_cmd_bank_debits ("history-2b",
+ account_url,
+ NULL,
+ 5),
TALER_TESTING_cmd_end ()
};