diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-16 19:00:15 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-16 19:00:15 +0100 |
commit | be1daf172c17cd60c7b8493d1f723db5ded0f8c1 (patch) | |
tree | f369099ff993fc1c8378a4fc01fc1a3157b4775d /src/testing | |
parent | 3de9e044eddbe4d7054df875d516be1273f5be7c (diff) | |
download | merchant-be1daf172c17cd60c7b8493d1f723db5ded0f8c1.tar.gz merchant-be1daf172c17cd60c7b8493d1f723db5ded0f8c1.tar.bz2 merchant-be1daf172c17cd60c7b8493d1f723db5ded0f8c1.zip |
code clean up and get KYC test to pass again with recent exchange changes
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/test_kyc_api.c | 3 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_kyc_get.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c index 5d47d9ba..507338e4 100644 --- a/src/testing/test_kyc_api.c +++ b/src/testing/test_kyc_api.c @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. - + TALER is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -248,7 +248,6 @@ run (void *cls, "kyc-pending", "kyc-provider-test-oauth2", "pass", - "state", MHD_HTTP_SEE_OTHER), CMD_EXEC_AGGREGATOR ("run-aggregator"), TALER_TESTING_cmd_check_bank_transfer ("check_bank_transfer-498c", diff --git a/src/testing/testing_api_cmd_kyc_get.c b/src/testing/testing_api_cmd_kyc_get.c index 16788113..96d0b58c 100644 --- a/src/testing/testing_api_cmd_kyc_get.c +++ b/src/testing/testing_api_cmd_kyc_get.c @@ -160,16 +160,20 @@ kyc_get_cb (void *cls, TALER_TESTING_FAIL (cs->is); } eq += strlen ("/kyc-proof/"); - nq = strchr (eq, '/'); - if (NULL == nq) + eq = strstr (eq, "state="); + if (NULL == eq) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Received unexpected KYC URL `%s' (%s)\n", + "Received unexpected 'state'-less KYC URL `%s' (%s)\n", url, dec); GNUNET_free (dec); TALER_TESTING_FAIL (cs->is); } + eq += strlen ("state="); + nq = strchr (eq, '&'); + if (NULL == nq) + nq = eq + strlen (eq); if (GNUNET_OK != GNUNET_STRINGS_string_to_data (eq, nq - eq, @@ -177,7 +181,7 @@ kyc_get_cb (void *cls, sizeof (cs->h_payto))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Received unexpected KYC URL `%s' (%s)\n", + "Received unexpected KYC URL `%s' (%s) - no h_payto in state\n", url, dec); GNUNET_free (dec); |