[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.4.5] tests: Fix unit tests after merge of #40237
commit 0485c7ddba8c3474d1be8972caa9505b09d65644
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Tue Jan 12 10:50:01 2021 -0500
tests: Fix unit tests after merge of #40237
---
src/test/test_hs_cache.c | 12 ++++++------
src/test/test_hs_client.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c
index e3be0e77ec..a1df2b0eea 100644
--- a/src/test/test_hs_cache.c
+++ b/src/test/test_hs_cache.c
@@ -587,8 +587,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",
@@ -643,7 +643,7 @@ test_client_cache_decrypt(void *arg)
hs_free_all();
- UNMOCK(networkstatus_get_live_consensus);
+ UNMOCK(networkstatus_get_reasonably_live_consensus);
}
static void
@@ -657,8 +657,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. */
@@ -696,7 +696,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[] = {
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 32a79a7f49..e797fdedd0 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -1121,8 +1121,8 @@ test_close_intro_circuits_cache_clean(void *arg)
/* This is needed because of the client cache expiration timestamp is based
* on having a consensus. See cached_client_descriptor_has_expired(). */
- 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",
@@ -1187,7 +1187,7 @@ test_close_intro_circuits_cache_clean(void *arg)
hs_descriptor_free(desc1);
hs_free_all();
rend_cache_free_all();
- UNMOCK(networkstatus_get_live_consensus);
+ UNMOCK(networkstatus_get_reasonably_live_consensus);
}
static void
@@ -1204,8 +1204,8 @@ test_socks_hs_errors(void *arg)
(void) arg;
- MOCK(networkstatus_get_live_consensus,
- mock_networkstatus_get_live_consensus);
+ MOCK(networkstatus_get_reasonably_live_consensus,
+ mock_networkstatus_get_reasonably_live_consensus);
MOCK(connection_mark_unattached_ap_,
mock_connection_mark_unattached_ap_no_close);
MOCK(read_file_to_str, mock_read_file_to_str);
@@ -1285,7 +1285,7 @@ test_socks_hs_errors(void *arg)
hs_free_all();
- UNMOCK(networkstatus_get_live_consensus);
+ UNMOCK(networkstatus_get_reasonably_live_consensus);
UNMOCK(connection_mark_unattached_ap_);
UNMOCK(read_file_to_str);
UNMOCK(tor_listdir);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits