diff options
author | David Goulet <dgoulet@torproject.org> | 2017-10-31 14:48:27 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-10-31 14:49:31 -0400 |
commit | bd631a649b5cfae23fc13be08c72d5c1c0c70174 (patch) | |
tree | 027aab0f5023914a4ada8d9ecfa416b53597836b /src/test/test_hs_service.c | |
parent | 814f4c6967d068f15ace98f78953a5dba0154ee7 (diff) | |
download | tor-bd631a649b5cfae23fc13be08c72d5c1c0c70174.tar.gz tor-bd631a649b5cfae23fc13be08c72d5c1c0c70174.zip |
test: Fix voting schedule for hs_service.c
Part of #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r-- | src/test/test_hs_service.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index 462c860a9a..3084c6b958 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -33,6 +33,7 @@ #include "circuitlist.h" #include "circuituse.h" #include "crypto.h" +#include "dirvote.h" #include "networkstatus.h" #include "nodelist.h" #include "relay.h" @@ -967,6 +968,7 @@ test_rotate_descriptors(void *arg) ret = parse_rfc1123_time("Sat, 26 Oct 1985 14:00:00 UTC", &mock_ns.fresh_until); tt_int_op(ret, OP_EQ, 0); + dirvote_recalculate_timing(get_options(), mock_ns.valid_after); /* Create a service with a default descriptor and state. It's added to the * global map. */ @@ -1004,6 +1006,7 @@ test_rotate_descriptors(void *arg) ret = parse_rfc1123_time("Sat, 27 Oct 1985 02:00:00 UTC", &mock_ns.fresh_until); tt_int_op(ret, OP_EQ, 0); + dirvote_recalculate_timing(get_options(), mock_ns.valid_after); /* Note down what to expect for the next rotation time which is 01:00 + 23h * meaning 00:00:00. */ @@ -1065,6 +1068,7 @@ test_build_update_descriptors(void *arg) ret = parse_rfc1123_time("Sat, 26 Oct 1985 04:00:00 UTC", &mock_ns.fresh_until); tt_int_op(ret, OP_EQ, 0); + dirvote_recalculate_timing(get_options(), mock_ns.valid_after); /* Create a service without a current descriptor to trigger a build. */ service = helper_create_service(); |