aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-12-21 22:05:42 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-12-21 22:05:42 +0100
commit5a6755b4b4d3cc400b9366d221fd4036106a2cd1 (patch)
tree6ac8dbd52e4b517ccfd652fe9c6ed7fffa092ded /src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c
parenta65823fa3288827513091c9fd74c18af35a9efdd (diff)
70% of testing serialization logic.
Diffstat (limited to 'src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c')
-rw-r--r--src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c29
1 files changed, 29 insertions, 0 deletions
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
index 841ab739..3ca0b76b 100644
--- 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 ()
};