summaryrefslogtreecommitdiff
path: root/src/test/test.c
diff options
context:
space:
mode:
authorDonncha O'Cearbhaill <donncha@donncha.is>2015-07-29 15:20:51 +0200
committerDonncha O'Cearbhaill <donncha@donncha.is>2015-08-25 17:30:11 +0200
commite0b82e5968af50e649963f6833ac7fd6e70a7e42 (patch)
tree6be6958eaea0a71abae4f39a20b31f1b60da980a /src/test/test.c
parent968cb95602b38af626bc85e394fbfb499a59b76c (diff)
downloadtor-e0b82e5968af50e649963f6833ac7fd6e70a7e42.tar.gz
tor-e0b82e5968af50e649963f6833ac7fd6e70a7e42.zip
Store service descriptors in the service descriptor cache
Service descriptors are now generated regardless of the the PublishHidServDescriptors option. The generated descriptors are stored in the service descriptor cache. The PublishHidServDescriptors = 1 option now prevents descriptor publication to the HSDirs rather than descriptor generation.
Diffstat (limited to 'src/test/test.c')
-rw-r--r--src/test/test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 7ad849f49e..683a3b4736 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -47,6 +47,7 @@ double fabs(double x);
#include "connection_edge.h"
#include "geoip.h"
#include "rendcommon.h"
+#include "rendcache.h"
#include "test.h"
#include "torgzip.h"
#include "memarea.h"
@@ -494,6 +495,9 @@ test_rend_fns(void *arg)
tt_str_op(address6,OP_EQ, "abcdefghijklmnop");
tt_assert(BAD_HOSTNAME == parse_extended_hostname(address7));
+ /* Initialize the service cache. */
+ rend_cache_init();
+
pk1 = pk_generate(0);
pk2 = pk_generate(1);
generated = tor_malloc_zero(sizeof(rend_service_descriptor_t));