diff options
author | David Goulet <dgoulet@torproject.org> | 2021-01-12 10:54:31 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-01-12 10:54:31 -0500 |
commit | b3652f2104c880bf626cb4e97e6088bca5a1571f (patch) | |
tree | 6cb537a2bc8f367f626f3dd728eb626d4041617d /src/test/test_hs_cache.c | |
parent | 5a822b462aaa8cf3cd749c253bb1e9e5f4f37fa2 (diff) | |
parent | 0485c7ddba8c3474d1be8972caa9505b09d65644 (diff) | |
download | tor-b3652f2104c880bf626cb4e97e6088bca5a1571f.tar.gz tor-b3652f2104c880bf626cb4e97e6088bca5a1571f.zip |
Merge branch 'ticket40237_043_01' into ticket40237_044_01
Diffstat (limited to 'src/test/test_hs_cache.c')
-rw-r--r-- | src/test/test_hs_cache.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c index f25bba3584..df96b2c791 100644 --- a/src/test/test_hs_cache.c +++ b/src/test/test_hs_cache.c @@ -462,9 +462,10 @@ test_hsdir_revision_counter_check(void *arg) 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; } @@ -485,8 +486,8 @@ test_client_cache(void *arg) /* Initialize HSDir cache subsystem */ init_test(); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); /* Set consensus time */ parse_rfc1123_time("Sat, 26 Oct 1985 13:00:00 UTC", @@ -589,8 +590,8 @@ test_client_cache_decrypt(void *arg) /* Initialize HSDir cache subsystem */ hs_init(); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); /* Set consensus time */ parse_rfc1123_time("Sat, 26 Oct 1985 13:00:00 UTC", @@ -645,7 +646,7 @@ test_client_cache_decrypt(void *arg) hs_free_all(); - UNMOCK(networkstatus_get_live_consensus); + UNMOCK(networkstatus_get_reasonably_live_consensus); } static void @@ -659,8 +660,8 @@ test_client_cache_remove(void *arg) hs_init(); - MOCK(networkstatus_get_live_consensus, - mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + mock_networkstatus_get_reasonably_live_consensus); /* Set consensus time. Lookup will not return the entry if it has expired * and it is checked against the consensus valid_after time. */ @@ -698,7 +699,7 @@ test_client_cache_remove(void *arg) hs_descriptor_free(desc1); hs_free_all(); - UNMOCK(networkstatus_get_live_consensus); + UNMOCK(networkstatus_get_reasonably_live_consensus); } struct testcase_t hs_cache[] = { |