diff options
Diffstat (limited to 'src/test/test_controller.c')
-rw-r--r-- | src/test/test_controller.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_controller.c b/src/test/test_controller.c index 4e65d76662..d9c0a1eaac 100644 --- a/src/test/test_controller.c +++ b/src/test/test_controller.c @@ -10,6 +10,7 @@ #include "rendservice.h" #include "routerlist.h" #include "test.h" +#include "test_helpers.h" static void test_add_onion_helper_keyarg(void *arg) @@ -186,8 +187,10 @@ test_rend_service_parse_port_config(void *arg) tor_free(err_msg); /* bogus IP address */ - cfg = rend_service_parse_port_config("100 1.2.3.4.5:9000", + MOCK(tor_addr_lookup, mock_tor_addr_lookup__fail_on_bad_addrs); + cfg = rend_service_parse_port_config("100 foo!!.example.com:9000", " ", &err_msg); + UNMOCK(tor_addr_lookup); tt_assert(!cfg); tt_str_op(err_msg, OP_EQ, "Unparseable address in hidden service port " "configuration."); |