summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_interpreter.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-10 16:02:03 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-10 16:02:03 +0100
commit6623afa2a306a6c00f414ddd75aa51fe464cae56 (patch)
tree1bb995ad3b7623531f6573f8550ac7005b23f6be /src/bank-lib/test_bank_interpreter.c
parentd36de3bdd6b4e5d88b8c44e525c4eeab43b26837 (diff)
downloadexchange-6623afa2a306a6c00f414ddd75aa51fe464cae56.tar.gz
exchange-6623afa2a306a6c00f414ddd75aa51fe464cae56.tar.bz2
exchange-6623afa2a306a6c00f414ddd75aa51fe464cae56.zip
add testcase for #5077 (passes), start to reduce use of exchange's admin/add/incoming (#5172, more to come)
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.c')
-rw-r--r--src/bank-lib/test_bank_interpreter.c42
1 files changed, 4 insertions, 38 deletions
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c
index 0dfc4c401..ab41ed611 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -159,35 +159,6 @@ test_cancelled (struct InterpreterState *is,
/**
- * Test if the /admin/add/incoming transaction at offset @a off
- * has been #TBI_OC_EXPECT_TRANSFER treated, and thus been
- * forgotten by the fakebank.
- *
- * @param is interpreter state (where we are right now)
- * @param off offset of the command to test for rejection
- * @return #GNUNET_YES if the command at @a off was cancelled
- */
-static int
-test_deleted_by_expected (struct InterpreterState *is,
- unsigned int off)
-{
- const struct TBI_Command *cmd = &is->commands[off];
-
- for (unsigned int i=0;i<is->ip;i++)
- {
- const struct TBI_Command *c = &is->commands[i];
-
- if (TBI_OC_EXPECT_TRANSFER != c->oc)
- continue;
- if (0 == strcmp (c->details.expect_transfer.cmd_ref,
- cmd->label))
- return GNUNET_YES;
- }
- return GNUNET_NO;
-}
-
-
-/**
* Item in the transaction history, as reconstructed from the
* command history.
*/
@@ -286,10 +257,6 @@ build_history (struct InterpreterState *is,
continue; /* skip until we find the marker */
if (total >= cmd->details.history.num_results * inc)
break; /* hit limit specified by command */
- if (GNUNET_YES ==
- test_deleted_by_expected (is,
- off))
- continue;
cancelled = test_cancelled (is,
off);
if ( (GNUNET_YES == cancelled) &&
@@ -335,11 +302,6 @@ build_history (struct InterpreterState *is,
continue; /* skip until we find the marker */
if (total >= cmd->details.history.num_results * inc)
break; /* hit limit specified by command */
- if (GNUNET_YES ==
- test_deleted_by_expected (is,
- off))
- continue;
-
if ( ( (0 != (cmd->details.history.direction & TALER_BANK_DIRECTION_CREDIT)) &&
(cmd->details.history.account_number ==
pos->details.admin_add_incoming.credit_account_no)) &&
@@ -787,6 +749,10 @@ interpreter_run (void *cls)
case 2:
auth.details.basic.username = "Exchange";
break;
+ case 3:
+ auth.details.basic.username = "user3";
+ auth.details.basic.password = "pass3";
+ break;
default:
GNUNET_break (0);
break;