aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_cache.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-11-04 13:52:54 -0400
committerNick Mathewson <nickm@torproject.org>2016-11-04 13:53:20 -0400
commitb876e5128aaf4f65976545ffc942f041bf5df1c2 (patch)
tree3279fd811b97f7a0a7ef9a2407c363d4e91d6a52 /src/test/test_hs_cache.c
parent09c750cce353d76c6b1e1481150c5dc0166f5a53 (diff)
downloadtor-b876e5128aaf4f65976545ffc942f041bf5df1c2.tar.gz
tor-b876e5128aaf4f65976545ffc942f041bf5df1c2.zip
prop224: fix unit test to actually initialize a connection object
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_cache.c')
-rw-r--r--src/test/test_hs_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c
index e3a3fda8bb..c33e4302a6 100644
--- a/src/test/test_hs_cache.c
+++ b/src/test/test_hs_cache.c
@@ -295,7 +295,6 @@ helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key)
/* The dir conn we are going to simulate */
dir_connection_t *conn = NULL;
- tor_addr_t mock_tor_addr;
/* First extract the blinded public key that we are going to use in our
query, and then build the actual query string. */
@@ -309,7 +308,8 @@ helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key)
}
/* Simulate an HTTP GET request to the HSDir */
- conn = dir_connection_new(tor_addr_family(&mock_tor_addr));
+ conn = dir_connection_new(AF_INET);
+ tor_addr_from_ipv4h(&conn->base_.addr, 0x7f000001);
TO_CONN(conn)->linked = 1;/* Pretend the conn is encrypted :) */
retval = directory_handle_command_get(conn, hsdir_query_str,
NULL, 0);