diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-03-15 08:02:20 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-03-17 01:37:11 +0100 |
commit | b55506b39509657aba64be1a4e22c5bf32c934f9 (patch) | |
tree | 06fa36a77ecff37e1950adfd0c8db0692a722409 /src/lib/testing_api_cmd_history.c | |
parent | 4699510294ca53af9924abf34c06671b62ec6f5a (diff) |
Double twister instance plus first coverage effort
The twisted tests now use two twister processes: one
to proxy the exchange, the other to proxy the merchant.
Additionally, it is now tested the reaction of /history
lib to a unexpected HTTP response code returned by the
merchant.
Diffstat (limited to 'src/lib/testing_api_cmd_history.c')
-rw-r--r-- | src/lib/testing_api_cmd_history.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/testing_api_cmd_history.c b/src/lib/testing_api_cmd_history.c index 3667d34d..b9763cfe 100644 --- a/src/lib/testing_api_cmd_history.c +++ b/src/lib/testing_api_cmd_history.c @@ -157,8 +157,18 @@ history_cb (void *cls, struct GNUNET_TIME_Absolute entry_timestamp; hs->ho = NULL; - if (hs->http_status != http_status) - TALER_TESTING_FAIL (hs->is); + + /* 410 is a convenience status that is used to + * trigger the "unexpected response code" in the + * lib, that should then result in a 0 status code + * passed here to the callback. */ + if (MHD_HTTP_GONE == hs->http_status) + { + if (0 != http_status) + TALER_TESTING_FAIL (hs->is); + + TALER_TESTING_interpreter_next (hs->is); + } nresult = json_array_size (json); if (hs->nresult != nresult) |