From f2b7e362690c23ffa0c17688ed58163240217d80 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 3 May 2016 06:15:09 +0200 Subject: finish tests for #4437 --- src/bank-lib/test_bank_interpreter.h | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'src/bank-lib/test_bank_interpreter.h') diff --git a/src/bank-lib/test_bank_interpreter.h b/src/bank-lib/test_bank_interpreter.h index f54986973..329b51461 100644 --- a/src/bank-lib/test_bank_interpreter.h +++ b/src/bank-lib/test_bank_interpreter.h @@ -42,7 +42,17 @@ enum TBI_OpCode /** * Add funds to a reserve by (faking) incoming wire transfer. */ - TBI_OC_ADMIN_ADD_INCOMING + TBI_OC_ADMIN_ADD_INCOMING, + + /** + * Expect that we have received the specified transaction at fakebank. + */ + TBI_OC_EXPECT_TRANSACTION, + + /** + * Expect that we have exhaustively gone over all transactions at fakebank. + */ + TBI_OC_EXPECT_TRANSACTIONS_EMPTY }; @@ -62,11 +72,6 @@ struct TBI_Command */ const char *label; - /** - * Which response code do we expect for this command? - */ - unsigned int expected_response_code; - /** * Details about the command. */ @@ -100,6 +105,11 @@ struct TBI_Command */ struct TALER_WireTransferIdentifierRawP wtid; + /** + * Which response code do we expect for this command? + */ + unsigned int expected_response_code; + /** * Set to the API's handle during the operation. */ @@ -107,6 +117,20 @@ struct TBI_Command } admin_add_incoming; + /** + * If @e opcode is #TBI_OC_EXPECT_TRANSACTION, this + * specifies which transaction we expected. + */ + struct { + + /** + * Label of the command of an /admin/add/incoming + * request that we should check was executed. + */ + const char *cmd_ref; + + } expect_transaction; + } details; }; -- cgit v1.2.3