commit a39b676f7bd75898a1ea599c6c0c9e243a416dc9
parent 88bfe66b3faaa39af19ce69e4b4da8f0ea3aaaba
Author: Marc Stibane <marc@taler.net>
Date: Wed, 18 Jan 2023 10:12:44 +0100
Integration Test and Sample Project calling it
Diffstat:
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/xcode/FTalerWalletcore.m b/xcode/FTalerWalletcore.m
@@ -17,29 +17,33 @@
static void TALER_WALLET_test_handler(void *cls, const char *message)
{
- printf("got message: %s\n", message);
+ printf("%s\n", message);
}
struct TALER_WALLET_Instance *
TALER_WALLET_test(int wait)
{
- struct TALER_WALLET_Instance *wh = TALER_WALLET_create();
+ struct TALER_WALLET_Instance *twi = TALER_WALLET_create();
- TALER_WALLET_set_message_handler(wh, &TALER_WALLET_test_handler, NULL);
+ TALER_WALLET_set_message_handler(twi, &TALER_WALLET_test_handler, NULL);
- TALER_WALLET_run(wh);
+ TALER_WALLET_run(twi);
- TALER_WALLET_send_request(wh, "{\"operation\": \"init\", \"args\": {\"skipDefaults\": true}}");
+ TALER_WALLET_send_request(twi, "{\"operation\": \"init\", \"args\": {\"skipDefaults\": true}}");
- TALER_WALLET_send_request(wh, "{\"operation\": \"getVersion\"}");
-
- //TALER_WALLET_send_request(wh, "{}");
+ TALER_WALLET_send_request(twi, "{\"operation\": \"getVersion\"}");
+ TALER_WALLET_send_request(twi, "{\"operation\": \"runIntegrationTest\", \"args\": {"
+ "\"amountToWithdraw\": \"KUDOS:3\", \"amountToSpend\": \"KUDOS:1\", "
+ "\"bankBaseUrl\": \"https://bank.demo.taler.net/demobanks/default/access-api/\", "
+ "\"exchangeBaseUrl\": \"https://exchange.demo.taler.net/\", "
+ "\"merchantBaseUrl\": \"https://backend.demo.taler.net/\", "
+ "\"merchantAuthToken\": \"secret-token:sandbox\"}}");
if (wait) {
// Wait for wallet thread to finish.
// If we don't call this, main() exits
// and the wallet thread is killed.
- TALER_WALLET_join(wh);
+ TALER_WALLET_join(twi);
}
- return wh;
+ return twi;
}
diff --git a/xcode/TalerTest.zip b/xcode/TalerTest.zip
Binary files differ.