summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_interpreter.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-03 06:15:09 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-03 06:15:09 +0200
commitf2b7e362690c23ffa0c17688ed58163240217d80 (patch)
tree1fe58d48ff6313ca25a0a465ac8e991c41be547e /src/bank-lib/test_bank_interpreter.h
parenteabbafc4dfdee936135451aa70000b53d0337430 (diff)
downloadexchange-f2b7e362690c23ffa0c17688ed58163240217d80.tar.gz
exchange-f2b7e362690c23ffa0c17688ed58163240217d80.tar.bz2
exchange-f2b7e362690c23ffa0c17688ed58163240217d80.zip
finish tests for #4437
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.h')
-rw-r--r--src/bank-lib/test_bank_interpreter.h36
1 files changed, 30 insertions, 6 deletions
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
};
@@ -63,11 +73,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.
*/
union
@@ -101,12 +106,31 @@ 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.
*/
struct TALER_BANK_AdminAddIncomingHandle *aih;
} 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;
};