summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-07 09:20:44 -0400
committerNick Mathewson <nickm@torproject.org>2014-10-13 14:30:02 -0400
commit3efeb711f104b58b1f8a46c56c56246f0049e3e1 (patch)
treeba013ba65ad56ab8b19f1d1e3755703a9ec064f4 /src/or/networkstatus.c
parent24dfbfda1db41d0e9feb5def09e1b7ede350de40 (diff)
downloadtor-3efeb711f104b58b1f8a46c56c56246f0049e3e1.tar.gz
tor-3efeb711f104b58b1f8a46c56c56246f0049e3e1.zip
Unit tests for 11243: loading ri, ei, mds from lists
These tests make sure that entries are actually marked undownloadable as appropriate.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index e61d1b436d..9c49d3431c 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -595,10 +595,10 @@ networkstatus_vote_find_entry_idx(networkstatus_t *ns,
/** As router_get_consensus_status_by_descriptor_digest, but does not return
* a const pointer. */
-routerstatus_t *
-router_get_mutable_consensus_status_by_descriptor_digest(
+MOCK_IMPL(routerstatus_t *,
+router_get_mutable_consensus_status_by_descriptor_digest,(
networkstatus_t *consensus,
- const char *digest)
+ const char *digest))
{
if (!consensus)
consensus = current_consensus;
@@ -628,8 +628,8 @@ router_get_consensus_status_by_descriptor_digest(networkstatus_t *consensus,
/** Given the digest of a router descriptor, return its current download
* status, or NULL if the digest is unrecognized. */
-download_status_t *
-router_get_dl_status_by_descriptor_digest(const char *d)
+MOCK_IMPL(download_status_t *,
+router_get_dl_status_by_descriptor_digest,(const char *d))
{
routerstatus_t *rs;
if (!current_ns_consensus)
@@ -995,8 +995,8 @@ networkstatus_get_latest_consensus(void)
/** Return the latest consensus we have whose flavor matches <b>f</b>, or NULL
* if we don't have one. */
-networkstatus_t *
-networkstatus_get_latest_consensus_by_flavor(consensus_flavor_t f)
+MOCK_IMPL(networkstatus_t *,
+networkstatus_get_latest_consensus_by_flavor,(consensus_flavor_t f))
{
if (f == FLAV_NS)
return current_ns_consensus;