aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-06-25 14:41:07 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-06-25 14:41:07 +0200
commit6500fab93b11a7d404324f5c997b4092c5bdbbbd (patch)
tree9cbed4e0226829304a0bd276265a953933bf4ac1
parent886382236c0ccdc354f06cb603c3d1ef30089799 (diff)
Splitting twisted test case into smaller CMD chunks.
-rw-r--r--src/exchange-lib/test_exchange_api_twisted.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/exchange-lib/test_exchange_api_twisted.c b/src/exchange-lib/test_exchange_api_twisted.c
index 7d24fbc95..5cbe4b827 100644
--- a/src/exchange-lib/test_exchange_api_twisted.c
+++ b/src/exchange-lib/test_exchange_api_twisted.c
@@ -140,7 +140,12 @@ run (void *cls,
struct TALER_TESTING_Interpreter *is)
{
- struct TALER_TESTING_Command commands[] = {
+
+ /**
+ * This batch aims to trigger the 409 Conflict
+ * response from a refresh-reveal operation.
+ */
+ struct TALER_TESTING_Command refresh_409_conflict[] = {
CMD_TRANSFER_TO_EXCHANGE
("refresh-create-reserve",
@@ -198,14 +203,12 @@ run (void *cls,
"refresh-melt",
MHD_HTTP_CONFLICT),
- /* Next chunk, refund conflicts
-
- (contract hash missmatch [!],
- original deposit does not exist V,
- currency missmatch) V;
-
- 'refund_transaction()' has many of the relevant cases;
- */
+ TALER_TESTING_cmd_end ()
+
+ };
+
+
+ struct TALER_TESTING_Command refund[] = {
CMD_TRANSFER_TO_EXCHANGE
("create-reserve-r1",
@@ -261,12 +264,9 @@ run (void *cls,
"EUR:0.01",
"deposit-refund-1"),
- /* This deposit CMD is used to provide "good" traits
- * to the next refund CMD, where 'good' means that the
- * POST /refund will pass the signature verification,
- * but the handler will then NOT judge the deposit as
- * refundable - actually it won't be found since it will
- * fail as double-spending attempt. */
+ /* This next deposit CMD is only used to provide a
+ * good merchant signature to the next (failing) refund
+ * operations. */
TALER_TESTING_cmd_deposit
("deposit-refund-to-fail",
@@ -307,6 +307,18 @@ run (void *cls,
"deposit-refund-1"),
TALER_TESTING_cmd_end ()
+
+ };
+
+ struct TALER_TESTING_Command commands[] = {
+
+ TALER_TESTING_cmd_batch ("refresh-reveal-409-conflict",
+ refresh_409_conflict),
+
+ TALER_TESTING_cmd_batch ("refund",
+ refund),
+
+ TALER_TESTING_cmd_end ()
};
TALER_TESTING_run_with_fakebank (is,