diff options
Diffstat (limited to 'src/testing/test_kyc_api.c')
-rw-r--r-- | src/testing/test_kyc_api.c | 81 |
1 files changed, 29 insertions, 52 deletions
diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c index d88de753..8bb19eab 100644 --- a/src/testing/test_kyc_api.c +++ b/src/testing/test_kyc_api.c @@ -110,51 +110,6 @@ static struct GNUNET_OS_Process *merchantd; */ #define MERCHANT_ACCOUNT_NAME "3" -/** - * Payto URIs to use for testing accounts on the merchant. - */ -const char *payto_uris[] = { - PAYTO_I1, - "payto://iban/CH9300762011623852957?receiver-name=Test" - /* Just for testing account inactivation. */ -}; - -const char *order_1_transfers[] = { - "post-transfer-1", - NULL -}; - -const char *order_1_forgets_1[] = { - "forget-1", - NULL -}; - -const char *order_1_forgets_2[] = { - "forget-1", - "forget-order-array-elem", - NULL -}; - -const char *order_1_forgets_3[] = { - "forget-1", - "forget-order-array-elem", - "forget-order-array-wc", - NULL -}; - - -/** - * Execute the taler-exchange-wirewatch command with - * our configuration file. - * - * @param label label to use for the command. - */ -static struct TALER_TESTING_Command -cmd_exec_wirewatch (const char *label) -{ - return TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE); -} - /** * Execute the taler-exchange-aggregator, closer and transfer commands with @@ -163,7 +118,7 @@ cmd_exec_wirewatch (const char *label) * @param label label to use for the command. */ #define CMD_EXEC_AGGREGATOR(label) \ - TALER_TESTING_cmd_exec_aggregator (label "-aggregator", CONFIG_FILE), \ + TALER_TESTING_cmd_exec_aggregator_with_kyc (label "-aggregator", CONFIG_FILE), \ TALER_TESTING_cmd_exec_transfer (label "-transfer", CONFIG_FILE) @@ -203,11 +158,10 @@ run (void *cls, cmd_transfer_to_exchange ("create-reserve-1", "EUR:10.02"), /** - * Make a reserve exist, - * according to the previous - * transfer. - */// - cmd_exec_wirewatch ("wirewatch-1"), + * Make a reserve exist, according to the previous transfer. + */ + TALER_TESTING_cmd_exec_wirewatch ("wirewatch-1", + CONFIG_FILE), TALER_TESTING_cmd_check_bank_admin_transfer ("check_bank_transfer-2", "EUR:10.02", payer_payto, @@ -264,6 +218,27 @@ run (void *cls, MHD_HTTP_NO_CONTENT), TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-1"), CMD_EXEC_AGGREGATOR ("run-aggregator"), + /* KYC: hence nothing happened at the bank yet: */ + TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-2"), + /* FIXME-#7052: this should ideally not be needed... */ + TALER_TESTING_cmd_merchant_get_order ("get-order", + merchant_url, + "create-proposal-1", + TALER_MERCHANT_OSC_PAID, + false, + MHD_HTTP_OK), + TALER_TESTING_cmd_merchant_kyc_get ("kyc-pending", + merchant_url, + NULL, + NULL, + EXCHANGE_URL, + MHD_HTTP_ACCEPTED), + TALER_TESTING_cmd_proof_kyc ("kyc-do", + "kyc-pending", + "pass", + "state", + MHD_HTTP_SEE_OTHER), + CMD_EXEC_AGGREGATOR ("run-aggregator"), TALER_TESTING_cmd_check_bank_transfer ("check_bank_transfer-498c", EXCHANGE_URL, "EUR:4.98", @@ -283,12 +258,14 @@ run (void *cls, MHD_HTTP_OK, "post-transfer-1", NULL), - TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-2"), + TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-3"), TALER_TESTING_cmd_end () }; struct TALER_TESTING_Command commands[] = { /* general setup */ + TALER_TESTING_cmd_oauth ("start-oauth-service", + 6666), TALER_TESTING_cmd_auditor_add ("add-auditor-OK", MHD_HTTP_NO_CONTENT, false), |