aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exchange-lib/test_exchange_api_keys_cherry_picking_new.c29
-rw-r--r--src/exchange-lib/testing_api_cmd_serialize_keys.c2
2 files changed, 30 insertions, 1 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 841ab739a..3ca0b76b3 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 ()
};
diff --git a/src/exchange-lib/testing_api_cmd_serialize_keys.c b/src/exchange-lib/testing_api_cmd_serialize_keys.c
index b53263db1..fdc5c14da 100644
--- 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;
}
/**