From 6623afa2a306a6c00f414ddd75aa51fe464cae56 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Dec 2017 16:02:03 +0100 Subject: add testcase for #5077 (passes), start to reduce use of exchange's admin/add/incoming (#5172, more to come) --- src/bank-lib/test_bank_interpreter.c | 42 ++++-------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'src/bank-lib/test_bank_interpreter.c') 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 @@ -158,35 +158,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;iip;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; -- cgit v1.2.3