diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-16 10:06:52 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-16 10:06:52 +0200 |
commit | a2b65f04a82de0301f87a199d72e85c209a3e803 (patch) | |
tree | 56e7b779182e43493d9f05b960a44a4be0830d99 | |
parent | 4b4d5d618830b59d716acf95ee3c35a86321ae8e (diff) |
run /trace functions twice to check caching works as expected
-rw-r--r-- | src/lib/test_merchant_api.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index 0140bbc8..abf4afc6 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c @@ -2042,6 +2042,12 @@ run (void *cls) .details.track_transfer.check_bank_ref = "check_bank_transfer-499c", .details.track_transfer.expected_pay_ref = "deposit-simple" }, + { .oc = OC_TRACK_TRANSFER, + .label = "track-transfer-1-again", + .expected_response_code = MHD_HTTP_OK, + .details.track_transfer.check_bank_ref = "check_bank_transfer-499c", + .details.track_transfer.expected_pay_ref = "deposit-simple" + }, /* Trace transaction to WTID */ { .oc = OC_TRACK_TRANSACTION, @@ -2050,6 +2056,12 @@ run (void *cls) .details.track_transaction.pay_ref = "deposit-simple", .details.track_transaction.expected_transfer_ref = "check_bank_transfer-499c" }, + { .oc = OC_TRACK_TRANSACTION, + .label = "track-transaction-1-again", + .expected_response_code = MHD_HTTP_OK, + .details.track_transaction.pay_ref = "deposit-simple", + .details.track_transaction.expected_transfer_ref = "check_bank_transfer-499c" + }, /* Pay again successfully on 2nd contract */ { .oc = OC_PAY, @@ -2066,6 +2078,11 @@ run (void *cls) .expected_response_code = MHD_HTTP_ACCEPTED, .details.track_transaction.pay_ref = "deposit-simple-2" }, + { .oc = OC_TRACK_TRANSACTION, + .label = "track-transaction-2-found-again", + .expected_response_code = MHD_HTTP_ACCEPTED, + .details.track_transaction.pay_ref = "deposit-simple-2" + }, /* Run transfers. */ { .oc = OC_RUN_AGGREGATOR, @@ -2091,6 +2108,12 @@ run (void *cls) .details.track_transaction.pay_ref = "deposit-simple-2", .details.track_transaction.expected_transfer_ref = "check_bank_transfer-499c-2" }, + { .oc = OC_TRACK_TRANSACTION, + .label = "track-transaction-2-again", + .expected_response_code = MHD_HTTP_OK, + .details.track_transaction.pay_ref = "deposit-simple-2", + .details.track_transaction.expected_transfer_ref = "check_bank_transfer-499c-2" + }, /* Trace the WTID back to the original transaction */ { .oc = OC_TRACK_TRANSFER, @@ -2099,6 +2122,12 @@ run (void *cls) .details.track_transfer.check_bank_ref = "check_bank_transfer-499c-2", .details.track_transfer.expected_pay_ref = "deposit-simple-2" }, + { .oc = OC_TRACK_TRANSFER, + .label = "track-transfer-2-again", + .expected_response_code = MHD_HTTP_OK, + .details.track_transfer.check_bank_ref = "check_bank_transfer-499c-2", + .details.track_transfer.expected_pay_ref = "deposit-simple-2" + }, /* end of testcase */ @@ -2169,10 +2198,10 @@ main (int argc, if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (cfg, "merchant", "INSTANCE", - &receiver)) + &receiver)) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using non default receiver '%s'\n", - receiver); + receiver); db = TALER_MERCHANTDB_plugin_load (cfg); if (NULL == db) |