summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-07-31 18:32:20 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-07-31 18:32:20 +0200
commit661bd552f0c2f6ba77860dae633322ddaf19bd6d (patch)
tree2d606f9a8f951dc39284c58e762315d3d2c4b3de /src/testing
parent1b36d79083247a1750e42e43b485f0581057b3a7 (diff)
downloadanastasis-661bd552f0c2f6ba77860dae633322ddaf19bd6d.tar.gz
anastasis-661bd552f0c2f6ba77860dae633322ddaf19bd6d.tar.bz2
anastasis-661bd552f0c2f6ba77860dae633322ddaf19bd6d.zip
future-proof API
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_config.c12
-rw-r--r--src/testing/testing_api_cmd_policy_lookup.c10
2 files changed, 8 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_config.c b/src/testing/testing_api_cmd_config.c
index 7b0dbca..069200b 100644
--- a/src/testing/testing_api_cmd_config.c
+++ b/src/testing/testing_api_cmd_config.c
@@ -61,29 +61,25 @@ struct ConfigState
* Function called with the results of a #ANASTASIS_get_config().
*
* @param cls closure
- * @param http_status HTTP status of the request
* @param config config from the server
*/
static void
config_cb (void *cls,
- unsigned int http_status,
const struct ANASTASIS_Config *config)
{
struct ConfigState *ss = cls;
ss->so = NULL;
- if (http_status != ss->http_status)
+ if (config->http_status != ss->http_status)
{
TALER_TESTING_unexpected_status (ss->is,
- http_status,
+ config->http_status,
ss->http_status);
}
- if (NULL == config)
+ if (GNUNET_OK == config->http_status)
{
- TALER_TESTING_interpreter_fail (ss->is);
- return;
+ ss->provider_salt = config->details.ok.provider_salt;
}
- ss->provider_salt = config->provider_salt;
TALER_TESTING_interpreter_next (ss->is);
}
diff --git a/src/testing/testing_api_cmd_policy_lookup.c b/src/testing/testing_api_cmd_policy_lookup.c
index e8c4983..58c7ddb 100644
--- a/src/testing/testing_api_cmd_policy_lookup.c
+++ b/src/testing/testing_api_cmd_policy_lookup.c
@@ -72,27 +72,25 @@ struct PolicyLookupState
* Function called with the results of a #ANASTASIS_policy_lookup().
*
* @param cls closure
- * @param http_status HTTP status of the request
* @param dd details about the lookup operation
*/
static void
policy_lookup_cb (void *cls,
- unsigned int http_status,
const struct ANASTASIS_DownloadDetails *dd)
{
struct PolicyLookupState *pls = cls;
pls->plo = NULL;
- if (http_status != pls->http_status)
+ if (dd->http_status != pls->http_status)
{
TALER_TESTING_unexpected_status (pls->is,
- http_status,
+ dd->http_status,
pls->http_status);
}
if (NULL != pls->upload_reference)
{
- if ( (MHD_HTTP_OK == http_status) &&
- (0 != GNUNET_memcmp (&dd->curr_policy_hash,
+ if ( (MHD_HTTP_OK == dd->http_status) &&
+ (0 != GNUNET_memcmp (&dd->details.ok.curr_policy_hash,
pls->upload_hash)) )
{
GNUNET_break (0);