diff options
author | David Goulet <dgoulet@torproject.org> | 2020-10-22 15:48:05 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-10-27 10:43:42 -0400 |
commit | 4c19eed35c8bae22cda219b7a4fb4a65d1c65525 (patch) | |
tree | 66d2575ad09ed7907b5079cc81ee578a73ce2211 /src/test/test_hs_service.c | |
parent | f2e42045902524cb8277ab9674f9d669d2d8ab00 (diff) | |
download | tor-4c19eed35c8bae22cda219b7a4fb4a65d1c65525.tar.gz tor-4c19eed35c8bae22cda219b7a4fb4a65d1c65525.zip |
tests: Fix unit tests after adding new HS metrics module
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r-- | src/test/test_hs_service.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index 608e738d85..ad38547495 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -54,6 +54,7 @@ #include "feature/hs/hs_ob.h" #include "feature/hs/hs_cell.h" #include "feature/hs/hs_intropoint.h" +#include "feature/hs/hs_metrics.h" #include "feature/hs/hs_service.h" #include "feature/nodelist/networkstatus.h" #include "feature/nodelist/nodelist.h" @@ -664,6 +665,7 @@ test_access_service(void *arg) tt_mem_op(query, OP_EQ, s, sizeof(hs_service_t)); /* Remove service, check if it actually works and then put it back. */ remove_service(global_map, s); + hs_metrics_service_free(s); tt_int_op(get_hs_service_map_size(), OP_EQ, 0); query = find_service(global_map, &s->keys.identity_pk); tt_ptr_op(query, OP_EQ, NULL); @@ -673,6 +675,7 @@ test_access_service(void *arg) tt_int_op(ret, OP_EQ, 0); tt_int_op(get_hs_service_map_size(), OP_EQ, 1); /* Twice should fail. */ + hs_metrics_service_free(s); /* Avoid BUG() on metrics init. */ ret = register_service(global_map, s); tt_int_op(ret, OP_EQ, -1); /* Remove service from map so we don't double free on cleanup. */ |