diff options
Diffstat (limited to 'src/mint-lib/test_mint_api.c')
-rw-r--r-- | src/mint-lib/test_mint_api.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c index 6fb099095..7b96f657c 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/mint-lib/test_mint_api.c @@ -33,9 +33,8 @@ /** * Is the configuration file is set to include wire format 'sepa'? - * Needs #3972 to be solved first. */ -#define WIRE_SEPA 0 +#define WIRE_SEPA 1 /** * Main execution context for the main loop. @@ -464,6 +463,11 @@ struct Command */ struct TALER_MINT_WireHandle *wh; + /** + * Format we expect to see, others will be *ignored*. + */ + const char *format; + } wire; } details; @@ -1038,10 +1042,6 @@ link_cb (void *cls, return; } /* check that the coins match */ - fprintf (stderr, - "Got %u coins\n", - num_coins); - for (i=0;i<num_coins;i++) for (j=i+1;j<num_coins;j++) if (0 == memcmp (&coin_privs[i], @@ -1186,6 +1186,13 @@ wire_cb (void *cls, /* 0 always signals the end of the iteration */ cmd->details.wire.wh = NULL; } + else if ( (NULL != method) && + (0 != strcasecmp (method, + cmd->details.wire.format)) ) + { + /* not the method we care about, skip */ + return; + } if (cmd->expected_response_code != http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -1994,13 +2001,15 @@ run (void *cls, { .oc = OC_WIRE, .label = "wire-test", /* /wire/test replies with a 302 redirect */ - .expected_response_code = MHD_HTTP_FOUND }, + .expected_response_code = MHD_HTTP_FOUND, + .details.wire.format = "test" }, #endif #if WIRE_SEPA - { .oc = OC_WIRE, + { .oc = OC_WIRE, .label = "wire-sepa", /* /wire/sepa replies with a 200 redirect */ - .expected_response_code = MHD_HTTP_OK }, + .expected_response_code = MHD_HTTP_OK, + .details.wire.format = "sepa" }, #endif /* *************** end of /wire testing ************** */ |