diff options
author | David Goulet <dgoulet@torproject.org> | 2021-01-12 10:46:25 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-01-12 10:46:25 -0500 |
commit | 60da5d62225c975842ef57195b7243baa7033acb (patch) | |
tree | c355fe467bd86c209bc6f75c6eb5fec367fb0568 /src/test/test_hs_service.c | |
parent | 4b39f46a611ff48ceb7ea212dbcdb2e5b6d26d3b (diff) | |
parent | 04b0263974c7ad1327e7a193884cf31d55f7949a (diff) | |
download | tor-60da5d62225c975842ef57195b7243baa7033acb.tar.gz tor-60da5d62225c975842ef57195b7243baa7033acb.zip |
Merge branch 'ticket40237_035_01' into ticket40237_043_01
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r-- | src/test/test_hs_service.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index e33d593d94..49c8d29d27 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -81,9 +81,10 @@ static networkstatus_t mock_ns; static networkstatus_t * -mock_networkstatus_get_live_consensus(time_t now) +mock_networkstatus_get_reasonably_live_consensus(time_t now, int flavor) { (void) now; + (void) flavor; return &mock_ns; } @@ -1345,8 +1346,8 @@ test_rotate_descriptors(void *arg) hs_init(); MOCK(get_or_state, get_or_state_replacement); MOCK(circuit_mark_for_close_, mock_circuit_mark_for_close); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); /* Descriptor rotation happens with a consensus with a new SRV. */ @@ -1434,7 +1435,7 @@ test_rotate_descriptors(void *arg) hs_free_all(); UNMOCK(get_or_state); UNMOCK(circuit_mark_for_close_); - UNMOCK(networkstatus_get_live_consensus); + UNMOCK(networkstatus_get_reasonably_live_consensus); } /** Test building descriptors: picking intro points, setting up their link @@ -1454,8 +1455,8 @@ test_build_update_descriptors(void *arg) MOCK(get_or_state, get_or_state_replacement); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); dummy_state = or_state_new(); @@ -1685,8 +1686,8 @@ test_build_descriptors(void *arg) MOCK(get_or_state, get_or_state_replacement); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); dummy_state = or_state_new(); @@ -1786,8 +1787,8 @@ test_upload_descriptors(void *arg) hs_init(); MOCK(get_or_state, get_or_state_replacement); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); dummy_state = or_state_new(); |