summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-31 14:06:37 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-31 14:06:37 -0500
commit3d937043c2961923f9c28152615dc591997328f0 (patch)
tree3d7d915dcb23ab1c4bbad14b5e392432040d7932 /src/test
parentbbf2d9cf6bb97c3e15ada5803681f856b844c2ff (diff)
downloadtor-3d937043c2961923f9c28152615dc591997328f0.tar.gz
tor-3d937043c2961923f9c28152615dc591997328f0.zip
Fix a failing unit test.
When we stopped looking at the "protocols" variable directly, we broke the hs_service/build_update_descriptors test, since it didn't actually update any of the flags. The fix here is to call summarize_protover_flags() from that test, and to expose summarize_protover_flags() as "STATIC" from routerparse.c.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_hs_service.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index 3e3a7d8e0d..fad65e61f7 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -20,6 +20,7 @@
#define STATEFILE_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define HS_CLIENT_PRIVATE
+#define ROUTERPARSE_PRIVATE
#include "test.h"
#include "test_helpers.h"
@@ -37,6 +38,7 @@
#include "networkstatus.h"
#include "nodelist.h"
#include "relay.h"
+#include "routerparse.h"
#include "hs_common.h"
#include "hs_config.h"
@@ -1210,6 +1212,7 @@ test_build_update_descriptors(void *arg)
/* Ugly yes but we never free the "ri" object so this just makes things
* easier. */
ri.protocol_list = (char *) "HSDir=1-2 LinkAuth=3";
+ summarize_protover_flags(&ri.pv, ri.protocol_list, NULL);
ret = curve25519_secret_key_generate(&curve25519_secret_key, 0);
tt_int_op(ret, OP_EQ, 0);
ri.onion_curve25519_pkey =