summaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-02-11 10:15:04 -0500
committerDavid Goulet <dgoulet@torproject.org>2020-02-11 10:15:04 -0500
commit33414e5494b56f3f677d022bfb4bb1ed99191032 (patch)
tree32619c30742fa06de03ad49dfede27077b9833f5 /src/feature/nodelist
parent6d9113d2f65b6e3142efdaa91a5b4761cd197be8 (diff)
downloadtor-33414e5494b56f3f677d022bfb4bb1ed99191032.tar.gz
tor-33414e5494b56f3f677d022bfb4bb1ed99191032.zip
test: Add unit test for connection_dir_is_global_write_low()
Part of #33029 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/dirlist.c4
-rw-r--r--src/feature/nodelist/dirlist.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/nodelist/dirlist.c b/src/feature/nodelist/dirlist.c
index df347889bf..749ff06a57 100644
--- a/src/feature/nodelist/dirlist.c
+++ b/src/feature/nodelist/dirlist.c
@@ -66,8 +66,8 @@ add_trusted_dir_to_nodelist_addr_set(const dir_server_t *dir)
/** Go over the trusted directory server list and add their address(es) to the
* nodelist address set. This is called everytime a new consensus is set. */
-void
-dirlist_add_trusted_addresses(void)
+MOCK_IMPL(void,
+dirlist_add_trusted_addresses, (void))
{
if (!trusted_dir_servers) {
return;
diff --git a/src/feature/nodelist/dirlist.h b/src/feature/nodelist/dirlist.h
index d302ff5f6c..d4bdb4cedc 100644
--- a/src/feature/nodelist/dirlist.h
+++ b/src/feature/nodelist/dirlist.h
@@ -44,6 +44,6 @@ void dir_server_add(dir_server_t *ent);
void clear_dir_servers(void);
void dirlist_free_all(void);
-void dirlist_add_trusted_addresses(void);
+MOCK_DECL(void, dirlist_add_trusted_addresses, (void));
#endif /* !defined(TOR_DIRLIST_H) */