diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-10-07 09:20:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-10-13 14:30:02 -0400 |
commit | 3efeb711f104b58b1f8a46c56c56246f0049e3e1 (patch) | |
tree | ba013ba65ad56ab8b19f1d1e3755703a9ec064f4 /src/or/networkstatus.h | |
parent | 24dfbfda1db41d0e9feb5def09e1b7ede350de40 (diff) | |
download | tor-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.h')
-rw-r--r-- | src/or/networkstatus.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index be0a86cdd8..344e4de72e 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -12,6 +12,8 @@ #ifndef TOR_NETWORKSTATUS_H #define TOR_NETWORKSTATUS_H +#include "testsupport.h" + void networkstatus_reset_warnings(void); void networkstatus_reset_download_failures(void); int router_reload_consensus_networkstatus(void); @@ -35,16 +37,19 @@ routerstatus_t *networkstatus_vote_find_mutable_entry(networkstatus_t *ns, const char *digest); int networkstatus_vote_find_entry_idx(networkstatus_t *ns, const char *digest, int *found_out); -download_status_t *router_get_dl_status_by_descriptor_digest(const char *d); + +MOCK_DECL(download_status_t *,router_get_dl_status_by_descriptor_digest, + (const char *d)); + const routerstatus_t *router_get_consensus_status_by_id(const char *digest); routerstatus_t *router_get_mutable_consensus_status_by_id( const char *digest); const routerstatus_t *router_get_consensus_status_by_descriptor_digest( networkstatus_t *consensus, const char *digest); -routerstatus_t *router_get_mutable_consensus_status_by_descriptor_digest( - networkstatus_t *consensus, - const char *digest); +MOCK_DECL(routerstatus_t *, + router_get_mutable_consensus_status_by_descriptor_digest, + (networkstatus_t *consensus, const char *digest)); const routerstatus_t *router_get_consensus_status_by_nickname( const char *nickname, int warn_if_unnamed); @@ -60,8 +65,8 @@ int consensus_is_waiting_for_certs(void); int client_would_use_router(const routerstatus_t *rs, time_t now, const or_options_t *options); networkstatus_t *networkstatus_get_latest_consensus(void); -networkstatus_t *networkstatus_get_latest_consensus_by_flavor( - consensus_flavor_t f); +MOCK_DECL(networkstatus_t *,networkstatus_get_latest_consensus_by_flavor, + (consensus_flavor_t f)); networkstatus_t *networkstatus_get_live_consensus(time_t now); networkstatus_t *networkstatus_get_reasonably_live_consensus(time_t now, int flavor); |