aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir_handle_get.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2016-03-11 10:40:31 -0500
committerRoger Dingledine <arma@torproject.org>2016-03-11 10:40:31 -0500
commite167910fce2b83d9de3a252cdf02cabdafced14b (patch)
tree9d8beb87b0455c32c5e79dd6d3b6e9543b748086 /src/test/test_dir_handle_get.c
parent656e23171d64885c1bea95403768386ee369e949 (diff)
downloadtor-e167910fce2b83d9de3a252cdf02cabdafced14b.tar.gz
tor-e167910fce2b83d9de3a252cdf02cabdafced14b.zip
rip out hid_serv_responsible_for_desc_id()
This simplifies relay behavior, because the relay offers the hsdir functionality independent of whether the directory authorities have decided this relay is suitable for clients to use yet. Implements ticket 18332.
Diffstat (limited to 'src/test/test_dir_handle_get.c')
-rw-r--r--src/test/test_dir_handle_get.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 954830dcaf..67bd840baf 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -389,10 +389,8 @@ test_dir_handle_get_rendezvous2_not_found(void *data)
}
NS_DECL(const routerinfo_t *, router_get_my_routerinfo, (void));
-NS_DECL(int, hid_serv_responsible_for_desc_id, (const char *id));
static routerinfo_t *mock_routerinfo;
-static int hid_serv_responsible_for_desc_id_response;
static const routerinfo_t *
NS(router_get_my_routerinfo)(void)
@@ -404,13 +402,6 @@ NS(router_get_my_routerinfo)(void)
return mock_routerinfo;
}
-static int
-NS(hid_serv_responsible_for_desc_id)(const char *id)
-{
- (void)id;
- return hid_serv_responsible_for_desc_id_response;
-}
-
static void
test_dir_handle_get_rendezvous2_on_encrypted_conn_success(void *data)
{
@@ -428,10 +419,8 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_success(void *data)
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
NS_MOCK(router_get_my_routerinfo);
- NS_MOCK(hid_serv_responsible_for_desc_id);
rend_cache_init();
- hid_serv_responsible_for_desc_id_response = 1;
/* create a valid rend service descriptor */
#define RECENT_TIME -10
@@ -473,7 +462,6 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_success(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
NS_UNMOCK(router_get_my_routerinfo);
- NS_UNMOCK(hid_serv_responsible_for_desc_id);
tor_free(mock_routerinfo->cache_info.signed_descriptor_body);
tor_free(mock_routerinfo);