diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-05-02 16:35:22 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:12:26 -0400 |
commit | dc3a2037f54bcef14b7021b847edd91d36bf4514 (patch) | |
tree | f2c13af32ad0d5f85aa2fb1c7927129033821427 /src/test/test_rendcache.c | |
parent | 43a73f6eb648632552a20dd17f5736550df75e10 (diff) | |
download | tor-dc3a2037f54bcef14b7021b847edd91d36bf4514.tar.gz tor-dc3a2037f54bcef14b7021b847edd91d36bf4514.zip |
test: Move some test code to test helpers.
Move code to create connection streams and rend_data structures to
test_helpers so that we can use them from the e2e rendezvous circuit
unittests.
Diffstat (limited to 'src/test/test_rendcache.c')
-rw-r--r-- | src/test/test_rendcache.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c index feba8f664e..c1c178930a 100644 --- a/src/test/test_rendcache.c +++ b/src/test/test_rendcache.c @@ -21,22 +21,6 @@ static const int TIME_IN_THE_PAST = -(REND_CACHE_MAX_AGE + \ REND_CACHE_MAX_SKEW + 60); static const int TIME_IN_THE_FUTURE = REND_CACHE_MAX_SKEW + 60; -static rend_data_t * -mock_rend_data(const char *onion_address) -{ - rend_data_v2_t *v2_data = tor_malloc_zero(sizeof(*v2_data)); - rend_data_t *rend_query = &v2_data->base_; - rend_query->version = 2; - - strlcpy(v2_data->onion_address, onion_address, - sizeof(v2_data->onion_address)); - v2_data->auth_type = REND_NO_AUTH; - rend_query->hsdirs_fp = smartlist_new(); - smartlist_add(rend_query->hsdirs_fp, tor_memdup("aaaaaaaaaaaaaaaaaaaaaaaa", - DIGEST_LEN)); - return rend_query; -} - static void test_rend_cache_lookup_entry(void *data) { |