diff options
author | George Kadianakis <desnacked@riseup.net> | 2018-06-14 15:38:46 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-17 15:57:46 -0400 |
commit | 2e8d4139a77111d5b24726e970744378dcb92baa (patch) | |
tree | a55f13fd900683a6f3a07659d7ae798c8db8b13a /src/test/test_hs_common.c | |
parent | 5fb6f656dfad3ddb178b76448742bfc3e2e834da (diff) | |
download | tor-2e8d4139a77111d5b24726e970744378dcb92baa.tar.gz tor-2e8d4139a77111d5b24726e970744378dcb92baa.zip |
Fix up some unittests by being more careful with the local time.
Now that the rev counter depends on the local time, we need to be more careful
in the unittests. Some unittests were breaking because they were using
consensus values from 1985, but they were not updating the local time
appropriately. That was causing the OPE module to complain that it was trying
to encrypt insanely large values.
Diffstat (limited to 'src/test/test_hs_common.c')
-rw-r--r-- | src/test/test_hs_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c index 6296a709dc..47a021312a 100644 --- a/src/test/test_hs_common.c +++ b/src/test/test_hs_common.c @@ -1361,7 +1361,8 @@ run_reachability_scenario(const reachability_cfg_t *cfg, int num_scenario) mock_service_ns->sr_info.previous_srv = cfg->service_previous_srv; /* Initialize a service to get keys. */ - service = helper_init_service(time(NULL)); + update_approx_time(mock_service_ns->valid_after); + service = helper_init_service(mock_service_ns->valid_after+1); /* * === Client setup === |