diff options
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/test_auditor_api.c | 3 | ||||
| -rw-r--r-- | src/testing/test_auditor_api_version.c | 3 | ||||
| -rw-r--r-- | src/testing/test_bank_api.c | 3 | ||||
| -rw-r--r-- | src/testing/test_bank_api_twisted.c | 2 | ||||
| -rw-r--r-- | src/testing/test_exchange_api.c | 4 | ||||
| -rw-r--r-- | src/testing/test_exchange_api_keys_cherry_picking.c | 3 | ||||
| -rw-r--r-- | src/testing/test_exchange_api_overlapping_keys_bug.c | 3 | ||||
| -rw-r--r-- | src/testing/test_exchange_api_revocation.c | 3 | ||||
| -rw-r--r-- | src/testing/test_exchange_api_twisted.c | 11 | ||||
| -rw-r--r-- | src/testing/test_exchange_management_api.c | 3 | ||||
| -rw-r--r-- | src/testing/test_kyc_api.c | 3 | ||||
| -rw-r--r-- | src/testing/test_taler_exchange_wirewatch.c | 2 | ||||
| -rw-r--r-- | src/testing/testing_api_cmd_refresh.c | 18 | 
13 files changed, 56 insertions, 5 deletions
| diff --git a/src/testing/test_auditor_api.c b/src/testing/test_auditor_api.c index d85ece1f..de28acc4 100644 --- a/src/testing/test_auditor_api.c +++ b/src/testing/test_auditor_api.c @@ -670,6 +670,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     commands,                                     bc.exchange_auth.wire_gateway_url); @@ -680,6 +681,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_auditor_api_version.c b/src/testing/test_auditor_api_version.c index 7b96525a..1b60b15d 100644 --- a/src/testing/test_auditor_api_version.c +++ b/src/testing/test_auditor_api_version.c @@ -91,6 +91,7 @@ version_cb (void *cls,              const struct TALER_AUDITOR_VersionInformation *vi,              enum TALER_AUDITOR_VersionCompatibility compat)  { +  (void) cls;    (void) hr;    if ( (NULL != vi) &&         (TALER_AUDITOR_VC_MATCH == compat) ) @@ -134,6 +135,8 @@ main (int argc,  {    struct GNUNET_OS_Process *proc; +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_bank_api.c b/src/testing/test_bank_api.c index e5a12589..d81fbe36 100644 --- a/src/testing/test_bank_api.c +++ b/src/testing/test_bank_api.c @@ -75,6 +75,7 @@ run (void *cls,  {    struct TALER_WireTransferIdentifierRawP wtid; +  (void) cls;    memset (&wtid, 42, sizeof (wtid));    { @@ -165,6 +166,8 @@ main (int argc,    int rv;    const char *cfgfile; +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_bank_api_twisted.c b/src/testing/test_bank_api_twisted.c index 8e505cdf..c550aaeb 100644 --- a/src/testing/test_bank_api_twisted.c +++ b/src/testing/test_bank_api_twisted.c @@ -86,6 +86,7 @@ run (void *cls,    /* Route our commands through twister. */    struct TALER_BANK_AuthenticationData exchange_auth_twisted; +  (void) cls;    memset (&wtid,            0x5a,            sizeof (wtid)); @@ -165,6 +166,7 @@ main (int argc,    int ret;    const char *cfgfilename; +  (void) argc;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c index 72968c25..3e1df384 100644 --- a/src/testing/test_exchange_api.c +++ b/src/testing/test_exchange_api.c @@ -902,6 +902,8 @@ run (void *cls,    struct TALER_TESTING_Command reserve_open_close[(RESERVE_OPEN_CLOSE_ITERATIONS                                                     * RESERVE_OPEN_CLOSE_CHUNK)                                                    + 1]; + +  (void) cls;    for (unsigned int i = 0;         i < RESERVE_OPEN_CLOSE_ITERATIONS;         i++) @@ -980,6 +982,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_api_keys_cherry_picking.c b/src/testing/test_exchange_api_keys_cherry_picking.c index e79bc2c5..6ab17c63 100644 --- a/src/testing/test_exchange_api_keys_cherry_picking.c +++ b/src/testing/test_exchange_api_keys_cherry_picking.c @@ -99,6 +99,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run (is,                       commands);  } @@ -108,6 +109,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_api_overlapping_keys_bug.c b/src/testing/test_exchange_api_overlapping_keys_bug.c index 74039cce..1f8c2919 100644 --- a/src/testing/test_exchange_api_overlapping_keys_bug.c +++ b/src/testing/test_exchange_api_overlapping_keys_bug.c @@ -79,6 +79,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run (is,                       commands);  } @@ -88,6 +89,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_api_revocation.c b/src/testing/test_exchange_api_revocation.c index d4595abe..9b66e20b 100644 --- a/src/testing/test_exchange_api_revocation.c +++ b/src/testing/test_exchange_api_revocation.c @@ -239,6 +239,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     revocation,                                     bc.exchange_auth.wire_gateway_url); @@ -249,6 +250,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_api_twisted.c b/src/testing/test_exchange_api_twisted.c index 818b54de..02471eb9 100644 --- a/src/testing/test_exchange_api_twisted.c +++ b/src/testing/test_exchange_api_twisted.c @@ -155,7 +155,8 @@ run (void *cls,     * NOTE: not all CMDs actually need the twister,     * so it may be better to move those into the "main"     * lib test suite. -   */struct TALER_TESTING_Command refund[] = { +   */ +  struct TALER_TESTING_Command refund[] = {      CMD_TRANSFER_TO_EXCHANGE ("create-reserve-r1",                                "EUR:5.01"),      CMD_EXEC_WIREWATCH ("wirewatch-r1"), @@ -183,7 +184,6 @@ run (void *cls,                                MHD_HTTP_FORBIDDEN,                                "EUR:5",                                "deposit-refund-1"), -      /* This next deposit CMD is only used to provide a       * good merchant signature to the next (failing) refund       * operations.  */ @@ -210,6 +210,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +#if 0    /**     * Test that we don't get errors when the keys from the exchange     * are out of date. @@ -234,6 +235,7 @@ run (void *cls,                                         MHD_HTTP_OK),      TALER_TESTING_cmd_end ()    }; +#endif    struct TALER_TESTING_Command commands[] = {      TALER_TESTING_cmd_wire_add ("add-wire-account", @@ -248,11 +250,14 @@ run (void *cls,                               refresh_409_conflict),      TALER_TESTING_cmd_batch ("refund",                               refund), +#if 0      TALER_TESTING_cmd_batch ("expired-keys",                               expired_keys), +#endif      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     commands,                                     bc.exchange_auth.wire_gateway_url); @@ -280,6 +285,8 @@ main (int argc,  {    int ret; +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_exchange_management_api.c b/src/testing/test_exchange_management_api.c index 0cf96823..b2d7871e 100644 --- a/src/testing/test_exchange_management_api.c +++ b/src/testing/test_exchange_management_api.c @@ -145,6 +145,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     commands,                                     bc.exchange_auth.wire_gateway_url); @@ -155,6 +156,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c index f90932b0..b9e9a9f8 100644 --- a/src/testing/test_kyc_api.c +++ b/src/testing/test_kyc_api.c @@ -231,6 +231,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     commands,                                     bc.exchange_auth.wire_gateway_url); @@ -241,6 +242,8 @@ int  main (int argc,        char *const *argv)  { +  (void) argc; +  (void) argv;    /* These environment variables get in the way... */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/test_taler_exchange_wirewatch.c b/src/testing/test_taler_exchange_wirewatch.c index 8477e628..30c2cf27 100644 --- a/src/testing/test_taler_exchange_wirewatch.c +++ b/src/testing/test_taler_exchange_wirewatch.c @@ -143,6 +143,7 @@ run (void *cls,      TALER_TESTING_cmd_end ()    }; +  (void) cls;    TALER_TESTING_run_with_fakebank (is,                                     all,                                     bc.exchange_auth.wire_gateway_url); @@ -155,6 +156,7 @@ main (int argc,  {    const char *plugin_name; +  (void) argc;    /* these might get in the way */    unsetenv ("XDG_DATA_HOME");    unsetenv ("XDG_CONFIG_HOME"); diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c index 8f6ba0cf..dc0392b9 100644 --- a/src/testing/testing_api_cmd_refresh.c +++ b/src/testing/testing_api_cmd_refresh.c @@ -490,6 +490,7 @@ refresh_reveal_cleanup (void *cls,  {    struct RefreshRevealState *rrs = cls; +  (void) cmd;    if (NULL != rrs->rrh)    {      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -741,6 +742,7 @@ refresh_link_run (void *cls,    const struct TALER_TESTING_Command *melt_cmd;    const struct TALER_TESTING_Command *coin_cmd; +  (void) cmd;    rls->is = is;    reveal_cmd = TALER_TESTING_interpreter_lookup_command (rls->is,                                                           rls->reveal_reference); @@ -855,6 +857,11 @@ do_melt_retry (void *cls)    rms->retry_task = NULL;    rms->is->commands[rms->is->ip].last_req_time      = GNUNET_TIME_absolute_get (); +  if (NULL != rms->refresh_data) +  { +    json_decref (rms->refresh_data); +    rms->refresh_data = NULL; +  }    melt_run (rms,              NULL,              rms->is); @@ -880,6 +887,7 @@ melt_cb (void *cls,  {    struct RefreshMeltState *rms = cls; +  (void) exchange_pub;    rms->rmh = NULL;    if (rms->expected_response_code != hr->http_status)    { @@ -966,6 +974,7 @@ melt_run (void *cls,    };    const char **melt_fresh_amounts; +  (void) cmd;    if (NULL == (melt_fresh_amounts = rms->melt_fresh_amounts))      melt_fresh_amounts = default_melt_fresh_amounts;    rms->is = is; @@ -1029,8 +1038,9 @@ melt_run (void *cls,      {        const struct TALER_EXCHANGE_DenomPublicKey *fresh_pk; -      if (GNUNET_OK != TALER_string_to_amount -            (melt_fresh_amounts[i], &fresh_amount)) +      if (GNUNET_OK != +          TALER_string_to_amount (melt_fresh_amounts[i], +                                  &fresh_amount))        {          GNUNET_break (0);          GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -1060,7 +1070,8 @@ melt_run (void *cls,        /* Make a deep copy of the RSA key */        TALER_denom_pub_deep_copy (&rms->fresh_pks[i].key,                                   &fresh_pk->key); -    } +    } /* end for */ +    GNUNET_assert (NULL == rms->refresh_data);      rms->refresh_data        = TALER_EXCHANGE_refresh_prepare (rms->melt_priv,                                          &melt_amount, @@ -1102,6 +1113,7 @@ melt_cleanup (void *cls,  {    struct RefreshMeltState *rms = cls; +  (void) cmd;    if (NULL != rms->rmh)    {      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 
