aboutsummaryrefslogtreecommitdiff
path: root/src/or/networkstatus.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-06-28 21:30:57 +0000
committerAndrea Shepard <andrea@torproject.org>2016-06-29 05:55:42 +0000
commit657eaee6ae640d5abffc760bed14b5d31ad1ea73 (patch)
treef38d042a7c80a8146da8acd1a8bc96174b6924ee /src/or/networkstatus.h
parentc69290072819d20e43bd0dd83fa8cefc1167b544 (diff)
downloadtor-657eaee6ae640d5abffc760bed14b5d31ad1ea73.tar.gz
tor-657eaee6ae640d5abffc760bed14b5d31ad1ea73.zip
Expose GETINFO download status statics for test suite and make things mockable
Diffstat (limited to 'src/or/networkstatus.h')
-rw-r--r--src/or/networkstatus.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index 6d5d05aefc..65923b67ba 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -38,14 +38,17 @@ routerstatus_t *networkstatus_vote_find_mutable_entry(networkstatus_t *ns,
int networkstatus_vote_find_entry_idx(networkstatus_t *ns,
const char *digest, int *found_out);
-download_status_t * networkstatus_get_dl_status_by_flavor(
- consensus_flavor_t flavor);
-download_status_t * networkstatus_get_dl_status_by_flavor_bootstrap(
- consensus_flavor_t flavor);
-download_status_t * networkstatus_get_dl_status_by_flavor_running(
- consensus_flavor_t flavor);
+MOCK_DECL(download_status_t *,
+ networkstatus_get_dl_status_by_flavor,
+ (consensus_flavor_t flavor));
+MOCK_DECL(download_status_t *,
+ networkstatus_get_dl_status_by_flavor_bootstrap,
+ (consensus_flavor_t flavor));
+MOCK_DECL(download_status_t *,
+ networkstatus_get_dl_status_by_flavor_running,
+ (consensus_flavor_t flavor));
-smartlist_t * router_get_descriptor_digests(void);
+MOCK_DECL(smartlist_t *, router_get_descriptor_digests, (void));
MOCK_DECL(download_status_t *,router_get_dl_status_by_descriptor_digest,
(const char *d));