5462: implementing the iteration.
This commit is contained in:
parent
00625791a2
commit
ef58152c2b
@ -892,35 +892,45 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_end ()
|
TALER_TESTING_cmd_end ()
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TALER_TESTING_Command reserve_open_close[] = {
|
#define RESERVE_OPEN_CLOSE_CHUNK 4
|
||||||
|
#define RESERVE_OPEN_CLOSE_ITERATIONS 3
|
||||||
#define CONSTANT_KEY \
|
#define CONSTANT_KEY \
|
||||||
"09QGYPEKNHBACK135BNXZFHA0YTQXT1KJDRVXF4J822G99AYNQ8G"
|
"09QGYPEKNHBACK135BNXZFHA0YTQXT1KJDRVXF4J822G99AYNQ8G"
|
||||||
|
|
||||||
TALER_TESTING_cmd_check_bank_empty
|
struct TALER_TESTING_Command reserve_open_close
|
||||||
("reserve-open-close-empty"),
|
[(RESERVE_OPEN_CLOSE_ITERATIONS
|
||||||
|
* RESERVE_OPEN_CLOSE_CHUNK) + 1];
|
||||||
|
|
||||||
CMD_TRANSFER_TO_EXCHANGE_SUBJECT
|
for (unsigned int i = 0;
|
||||||
|
i < RESERVE_OPEN_CLOSE_ITERATIONS;
|
||||||
|
i++)
|
||||||
|
{
|
||||||
|
reserve_open_close[i * RESERVE_OPEN_CLOSE_CHUNK]
|
||||||
|
= CMD_TRANSFER_TO_EXCHANGE_SUBJECT
|
||||||
("reserve-open-close-key",
|
("reserve-open-close-key",
|
||||||
"EUR:20",
|
"EUR:20",
|
||||||
CONSTANT_KEY),
|
CONSTANT_KEY);
|
||||||
|
|
||||||
TALER_TESTING_cmd_exec_wirewatch
|
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1]
|
||||||
|
= TALER_TESTING_cmd_exec_wirewatch
|
||||||
("reserve-open-close-wirewatch",
|
("reserve-open-close-wirewatch",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
CONFIG_FILE_EXPIRE_RESERVE_NOW);
|
||||||
|
|
||||||
/* Wire back to the bank */
|
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2]
|
||||||
TALER_TESTING_cmd_exec_aggregator
|
= TALER_TESTING_cmd_exec_aggregator
|
||||||
("reserve-open-close-aggregation",
|
("reserve-open-close-aggregation",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
CONFIG_FILE_EXPIRE_RESERVE_NOW);
|
||||||
|
|
||||||
TALER_TESTING_cmd_status ("reserve-open-close-status",
|
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 3]
|
||||||
|
= TALER_TESTING_cmd_status ("reserve-open-close-status",
|
||||||
is->exchange,
|
is->exchange,
|
||||||
"reserve-open-close-key",
|
"reserve-open-close-key",
|
||||||
"EUR:0",
|
"EUR:0",
|
||||||
MHD_HTTP_OK),
|
MHD_HTTP_OK);
|
||||||
TALER_TESTING_cmd_end ()
|
}
|
||||||
};
|
reserve_open_close
|
||||||
|
[RESERVE_OPEN_CLOSE_ITERATIONS * RESERVE_OPEN_CLOSE_CHUNK]
|
||||||
|
= TALER_TESTING_cmd_end ();
|
||||||
|
|
||||||
struct TALER_TESTING_Command commands[] = {
|
struct TALER_TESTING_Command commands[] = {
|
||||||
|
|
||||||
@ -947,12 +957,12 @@ run (void *cls,
|
|||||||
|
|
||||||
TALER_TESTING_cmd_batch ("payback",
|
TALER_TESTING_cmd_batch ("payback",
|
||||||
payback),
|
payback),
|
||||||
|
/* Fix #5462. */
|
||||||
TALER_TESTING_cmd_batch ("reserve-open-close",
|
TALER_TESTING_cmd_batch ("reserve-open-close",
|
||||||
reserve_open_close),
|
reserve_open_close),
|
||||||
/**
|
/**
|
||||||
* End the suite. Fixme: better to have a label for this
|
* End the suite. Fixme: better to have a label for this
|
||||||
* too, as it shows a "(null)" token on logs.
|
* too, as it shows as "(null)" on logs.
|
||||||
*/
|
*/
|
||||||
TALER_TESTING_cmd_end ()
|
TALER_TESTING_cmd_end ()
|
||||||
};
|
};
|
||||||
|
@ -94,8 +94,13 @@ batch_cleanup (void *cls,
|
|||||||
for (unsigned int i=0;
|
for (unsigned int i=0;
|
||||||
NULL != bs->batch[i].label;
|
NULL != bs->batch[i].label;
|
||||||
i++)
|
i++)
|
||||||
|
{
|
||||||
|
TALER_LOG_DEBUG ("Batch-cleaning element %u, labelled '%s'\n",
|
||||||
|
i,
|
||||||
|
bs->batch[i].label);
|
||||||
bs->batch[i].cleanup (bs->batch[i].cls,
|
bs->batch[i].cleanup (bs->batch[i].cls,
|
||||||
&bs->batch[i]);
|
&bs->batch[i]);
|
||||||
|
}
|
||||||
GNUNET_free_non_null (bs->batch);
|
GNUNET_free_non_null (bs->batch);
|
||||||
GNUNET_free (bs);
|
GNUNET_free (bs);
|
||||||
}
|
}
|
||||||
|
@ -553,6 +553,11 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
|
|||||||
struct FakebankTransferState *fts;
|
struct FakebankTransferState *fts;
|
||||||
|
|
||||||
fts = GNUNET_new (struct FakebankTransferState);
|
fts = GNUNET_new (struct FakebankTransferState);
|
||||||
|
|
||||||
|
TALER_LOG_DEBUG ("%s:FTS@%p\n",
|
||||||
|
label,
|
||||||
|
fts);
|
||||||
|
|
||||||
fts->bank_url = bank_url;
|
fts->bank_url = bank_url;
|
||||||
fts->credit_account_no = credit_account_no;
|
fts->credit_account_no = credit_account_no;
|
||||||
fts->debit_account_no = debit_account_no;
|
fts->debit_account_no = debit_account_no;
|
||||||
|
Loading…
Reference in New Issue
Block a user