summaryrefslogtreecommitdiff
path: root/src/lib/test_exchange_api_keys_cherry_picking_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/test_exchange_api_keys_cherry_picking_new.c')
-rw-r--r--src/lib/test_exchange_api_keys_cherry_picking_new.c64
1 files changed, 21 insertions, 43 deletions
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 490961f8..e9763bd4 100644
--- a/src/lib/test_exchange_api_keys_cherry_picking_new.c
+++ b/src/lib/test_exchange_api_keys_cherry_picking_new.c
@@ -54,6 +54,9 @@
#define CONFIG_FILE_EXTENDED_2 \
"test_exchange_api_keys_cherry_picking_extended_2.conf"
+
+#define NDKS_RIGHT_BEFORE_SERIALIZATION 46
+
/**
* Add seconds.
*
@@ -128,52 +131,28 @@ run (void *cls,
TALER_TESTING_cmd_connect_with_state
("reconnect-with-state",
"serialize-keys"),
-
+ /**
+ * Make sure we have the same keys situation as
+ * it was before the serialization.
+ */
+ TALER_TESTING_cmd_check_keys_with_now
+ ("check-keys-after-deserialization",
+ 4,
+ NDKS_RIGHT_BEFORE_SERIALIZATION,
+ /**
+ * Pretend 5 seconds passed.
+ */
+ ADDSECS (TTH_parse_time (JAN2030),
+ 5)),
+ /**
+ * Use one of the deserialized keys.
+ */
TALER_TESTING_cmd_wire
("verify-/wire-with-serialized-keys",
"x-taler-bank",
NULL,
MHD_HTTP_OK),
- /**
- * This loads a very big lookahead_sign (3500s).
- */
- TALER_TESTING_cmd_exec_keyup
- ("keyup-serialization",
- CONFIG_FILE_EXTENDED_2),
-
- #if 0
-
- FIXME: #5672
-
- The test below fails on different systems. Infact, different
- systems can generate different "anchors" values for their
- denoms, therefore the fixed value required by the test below
- (45) is condemned to fail.
-
- However, this seems to happen only when very big values are
- used for the "lookahead_sign" value. Here we use 3500 seconds,
- and the test breaks.
-
- A reasonable fix is to allow for some slack in the number of
- the expected keys.
-
- TALER_TESTING_cmd_check_keys ("check-freshest-keys",
- /* At this point, /keys has been
- * downloaded roughly 6 times, so by
- * forcing 10 here we make sure we get
- * all the new ones. */
- 10,
- /* We use a very high number here to make
- * sure the "big" lookahead value got
- * respected. */
- 45),
- #endif
- TALER_TESTING_cmd_wire ("verify-/wire-with-fresh-keys",
- "x-taler-bank",
- NULL,
- MHD_HTTP_OK),
-
TALER_TESTING_cmd_end (),
};
@@ -233,10 +212,11 @@ run (void *cls,
* ----
* 46
*/
+
TALER_TESTING_cmd_check_keys_with_now
("check-keys-3",
3,
- 46,
+ NDKS_RIGHT_BEFORE_SERIALIZATION,
TTH_parse_time (JAN2030)),
TALER_TESTING_cmd_end ()
@@ -245,10 +225,8 @@ run (void *cls,
TALER_TESTING_cmd_batch ("ordinary-cherry-pick",
ordinary_cherry_pick),
- /*
TALER_TESTING_cmd_batch ("keys-serialization",
keys_serialization),
- */
TALER_TESTING_cmd_end ()
};