exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 5a6755b4b4d3cc400b9366d221fd4036106a2cd1
parent a65823fa3288827513091c9fd74c18af35a9efdd
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 21 Dec 2018 22:05:42 +0100

70% of testing serialization logic.

Diffstat:
Msrc/exchange-lib/test_exchange_api_keys_cherry_picking_new.c | 29+++++++++++++++++++++++++++++
Msrc/exchange-lib/testing_api_cmd_serialize_keys.c | 2+-
2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c b/src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c @@ -68,42 +68,71 @@ static void run (void *cls, struct TALER_TESTING_Interpreter *is) { + + struct TALER_TESTING_Command keys_serialization[] = { + + /** + * Serialize keys, and disconnect from the exchange. + */ + TALER_TESTING_cmd_serialize_keys ("serialize-keys"), + + /** + * Reconnect to the exchange using the serialized keys. + */ + TALER_TESTING_cmd_connect_with_state ("reconnect-with-state", + "serialize-keys"), + TALER_TESTING_cmd_end () + }; + struct TALER_TESTING_Command commands[] = { /* Trigger keys reloading from disk. */ TALER_TESTING_cmd_signal ("signal-reaction-1", is->exchanged, SIGUSR1), + TALER_TESTING_cmd_check_keys ("check-keys-1", 1, 4), /* sleep a bit */ TALER_TESTING_cmd_sleep ("sleep", 10), + /* 1st keyup happens at start-up */ TALER_TESTING_cmd_exec_keyup ("keyup-2", CONFIG_FILE_EXTENDED), + TALER_TESTING_cmd_exec_auditor_sign ("sign-keys-1", CONFIG_FILE), + + /* Cause exchange to reload (new) keys */ TALER_TESTING_cmd_signal ("trigger-keys-reload-1", is->exchanged, SIGUSR1), + TALER_TESTING_cmd_check_keys ("check-keys-2", 2, 6), /* sleep a bit */ TALER_TESTING_cmd_sleep ("sleep", 20), + /* Do 2nd keyup */ TALER_TESTING_cmd_exec_keyup ("keyup-3", CONFIG_FILE_EXTENDED), + TALER_TESTING_cmd_exec_auditor_sign ("sign-keys-2", CONFIG_FILE), + TALER_TESTING_cmd_signal ("trigger-keys-reload-2", is->exchanged, SIGUSR1), + TALER_TESTING_cmd_check_keys ("check-keys-3", 3, 8), + + TALER_TESTING_cmd_batch ("keys-serialization", + keys_serialization), TALER_TESTING_cmd_end () }; diff --git a/src/exchange-lib/testing_api_cmd_serialize_keys.c b/src/exchange-lib/testing_api_cmd_serialize_keys.c @@ -216,7 +216,7 @@ connect_with_state_cleanup (void *cls, const struct TALER_TESTING_Command *cmd) { - + return; } /**