aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_helpers.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2016-08-25 11:11:23 -0400
committerDavid Goulet <dgoulet@torproject.org>2016-11-04 10:32:50 -0400
commita8efd087bdd937027713217d74e1cfd40fba4961 (patch)
treed96d02bd9a1bc64097c628b01f747ba51aa5f02a /src/test/test_helpers.c
parentf59990f24ddf3e5c7cdeb82c9e8cf16c7dcce56b (diff)
downloadtor-a8efd087bdd937027713217d74e1cfd40fba4961.tar.gz
tor-a8efd087bdd937027713217d74e1cfd40fba4961.zip
test: Add prop224 directory fetch/upload unit tests
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/test/test_helpers.c')
-rw-r--r--src/test/test_helpers.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index ae9fc7a243..130ec43a3a 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -12,6 +12,7 @@
#include "routerlist.h"
#include "nodelist.h"
+#include "buffers.h"
#include "test.h"
#include "test_helpers.h"
@@ -92,3 +93,15 @@ helper_setup_fake_routerlist(void)
UNMOCK(router_descriptor_is_older_than);
}
+void
+connection_write_to_buf_mock(const char *string, size_t len,
+ connection_t *conn, int zlib)
+{
+ (void) zlib;
+
+ tor_assert(string);
+ tor_assert(conn);
+
+ write_to_buf(string, len, conn->outbuf);
+}
+