diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-26 00:09:01 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-26 00:09:01 +0200 |
commit | b87d1112ea479537bda5e1ba1e1100ee53315315 (patch) | |
tree | 4a8f95d685770228ad5e76342a663eabcf355805 /src/testing/testing_api_traits.c | |
parent | ddedf03a816e5139b235a3ebdf5b600508c5ed5f (diff) | |
parent | 421129a32ed88fee49108c76e67c16b60f95116b (diff) | |
download | exchange-b87d1112ea479537bda5e1ba1e1100ee53315315.tar.xz |
Merge branch 'master' into age-withdraw-merge
Diffstat (limited to 'src/testing/testing_api_traits.c')
-rw-r--r-- | src/testing/testing_api_traits.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/testing/testing_api_traits.c b/src/testing/testing_api_traits.c index d84e2c37e..d00a8d8ca 100644 --- a/src/testing/testing_api_traits.c +++ b/src/testing/testing_api_traits.c @@ -102,4 +102,59 @@ TALER_TESTING_get_exchange (struct TALER_TESTING_Interpreter *is) } +const char * +TALER_TESTING_get_exchange_url (struct TALER_TESTING_Interpreter *is) +{ + const char *exchange_url; + const struct TALER_TESTING_Command *exchange_cmd; + + exchange_cmd + = TALER_TESTING_interpreter_get_command (is, + "exchange"); + if (NULL == exchange_cmd) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + if (GNUNET_OK != + TALER_TESTING_get_trait_exchange_url (exchange_cmd, + &exchange_url)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + return exchange_url; +} + + +struct TALER_EXCHANGE_Keys * +TALER_TESTING_get_keys ( + struct TALER_TESTING_Interpreter *is) +{ + struct TALER_EXCHANGE_Keys *keys; + const struct TALER_TESTING_Command *exchange_cmd; + + exchange_cmd + = TALER_TESTING_interpreter_get_command (is, + "exchange"); + if (NULL == exchange_cmd) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + if (GNUNET_OK != + TALER_TESTING_get_trait_keys (exchange_cmd, + &keys)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return NULL; + } + return keys; +} + + /* end of testing_api_traits.c */ |