diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-04 13:26:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-04 13:26:37 -0400 |
commit | c35c43d7d9df793c890deb14800e24327fbca452 (patch) | |
tree | 3f6f3623c301b1900fbf58bb84ec86657baebce0 /src/test/test_connection.c | |
parent | bd6aa4f3d19a571adeaa956728f7e842d847c4ee (diff) | |
parent | c189cb5cc29e92e55f8e94b5531d2626eff71d63 (diff) | |
download | tor-c35c43d7d9df793c890deb14800e24327fbca452.tar.gz tor-c35c43d7d9df793c890deb14800e24327fbca452.zip |
Merge branch 'ticket17238_029_02-resquash'
Conflicts:
src/or/rendclient.c
src/or/rendcommon.c
src/or/routerparse.c
src/test/test_dir.c
src/trunnel/ed25519_cert.h
Diffstat (limited to 'src/test/test_connection.c')
-rw-r--r-- | src/test/test_connection.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/test_connection.c b/src/test/test_connection.c index d394fc9852..5cda4f3175 100644 --- a/src/test/test_connection.c +++ b/src/test/test_connection.c @@ -10,6 +10,7 @@ #include "test.h" #include "connection.h" +#include "hs_common.h" #include "main.h" #include "microdesc.h" #include "networkstatus.h" @@ -265,13 +266,9 @@ test_conn_get_rend_setup(const struct testcase_t *tc) rend_cache_init(); /* TODO: use directory_initiate_command_rend() to do this - maybe? */ - conn->rend_data = tor_malloc_zero(sizeof(rend_data_t)); tor_assert(strlen(TEST_CONN_REND_ADDR) == REND_SERVICE_ID_LEN_BASE32); - memcpy(conn->rend_data->onion_address, - TEST_CONN_REND_ADDR, - REND_SERVICE_ID_LEN_BASE32+1); - conn->rend_data->hsdirs_fp = smartlist_new(); - + conn->rend_data = rend_data_client_create(TEST_CONN_REND_ADDR, NULL, NULL, + REND_NO_AUTH); assert_connection_ok(&conn->base_, time(NULL)); return conn; @@ -551,7 +548,8 @@ test_conn_get_rend(void *arg) tt_assert(connection_get_by_type_state_rendquery( conn->base_.type, conn->base_.state, - conn->rend_data->onion_address) + rend_data_get_address( + conn->rend_data)) == TO_CONN(conn)); tt_assert(connection_get_by_type_state_rendquery( TEST_CONN_TYPE, |