aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bank-lib/fakebank.c5
-rw-r--r--src/lib/test_exchange_api_keys_cherry_picking_new.c32
-rw-r--r--src/lib/testing_api_loop.c5
3 files changed, 10 insertions, 32 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 52f0d73a9..da6bb1552 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -154,7 +154,7 @@ struct TALER_FAKEBANK_Handle
* Boxed @e mhd_fd.
*/
struct GNUNET_NETWORK_Handle *mhd_rfd;
-
+
/**
* File descriptor to use to wait for MHD.
*/
@@ -730,6 +730,7 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
GNUNET_break (0);
return MHD_NO;
}
+ start_number = 0;
if ( (1 != sscanf (delta,
"%lld",
&count)) ||
@@ -880,7 +881,7 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
"wt_subject", subject);
GNUNET_assert (NULL != trans);
GNUNET_free (subject);
-
+
history_element = GNUNET_new (struct HistoryElement);
history_element->element = trans;
diff --git a/src/lib/test_exchange_api_keys_cherry_picking_new.c b/src/lib/test_exchange_api_keys_cherry_picking_new.c
index b7cea5a48..45d5b7cb8 100644
--- a/src/lib/test_exchange_api_keys_cherry_picking_new.c
+++ b/src/lib/test_exchange_api_keys_cherry_picking_new.c
@@ -73,46 +73,37 @@ 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_wire ("verify-/wire-with-serialized-keys",
"x-taler-bank",
NULL,
MHD_HTTP_OK),
-
TALER_TESTING_cmd_exec_keyup ("keyup-serialization",
CONFIG_FILE_EXTENDED_2),
-
TALER_TESTING_cmd_exec_auditor_sign
("auditor-sign-serialization",
CONFIG_FILE_EXTENDED_2),
-
TALER_TESTING_cmd_sleep ("sleep-serialization",
3),
-
TALER_TESTING_cmd_signal ("reload-keys-serialization",
is->exchanged,
SIGUSR1),
-
TALER_TESTING_cmd_sleep ("sleep-serialization",
3),
/**
* Why keys number decrease?
*/
TALER_TESTING_cmd_check_keys ("check-freshest-keys",
- 8,
+ 9, /* generation */
10),
TALER_TESTING_cmd_wire ("verify-/wire-with-fresh-keys",
@@ -125,64 +116,49 @@ run (void *cls,
};
struct TALER_TESTING_Command ordinary_cherry_pick[] = {
-
/* Trigger keys reloading from disk. */
TALER_TESTING_cmd_signal ("signal-reaction-1",
is->exchanged,
SIGUSR1),
-
TALER_TESTING_cmd_check_keys ("check-keys-1",
- 1,
+ 1, /* generation */
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_EXTENDED),
-
/* 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,
+ 2, /* generation */
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,
+ 3, /* generation */
8),
TALER_TESTING_cmd_end ()
};
-
-
struct TALER_TESTING_Command commands[] = {
-
TALER_TESTING_cmd_batch ("ordinary-cherry-pick",
ordinary_cherry_pick),
-
TALER_TESTING_cmd_batch ("keys-serialization",
keys_serialization),
-
TALER_TESTING_cmd_end ()
};
diff --git a/src/lib/testing_api_loop.c b/src/lib/testing_api_loop.c
index 0582b73ba..39a9b71a1 100644
--- a/src/lib/testing_api_loop.c
+++ b/src/lib/testing_api_loop.c
@@ -625,8 +625,9 @@ TALER_TESTING_cert_cb
else
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got %d DK from /keys\n",
- keys->num_denom_keys);
+ "Got %d DK from /keys in generation %u\n",
+ keys->num_denom_keys,
+ is->key_generation + 1);
}
is->key_generation++;
is->keys = keys;