summaryrefslogtreecommitdiff
path: root/src/test/test_config.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2020-11-19 17:44:00 +0000
committerAlexander Færøy <ahf@torproject.org>2020-11-19 17:44:00 +0000
commitb274e46309b4375f6014f3b698ea24b32d4935a5 (patch)
treed7dfddca0956d49a31827677bf54398a510d374e /src/test/test_config.c
parentea52705e4b1753a75aac77ec0bc828d70327a4ad (diff)
parent77bb4b0838da1d1c1cb7d2d47b02954abeb00a21 (diff)
downloadtor-b274e46309b4375f6014f3b698ea24b32d4935a5.tar.gz
tor-b274e46309b4375f6014f3b698ea24b32d4935a5.zip
Merge branch 'maint-0.4.4' into maint-0.4.5
Diffstat (limited to 'src/test/test_config.c')
-rw-r--r--src/test/test_config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c
index d680ab31ef..49d7b87410 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -706,11 +706,13 @@ test_config_parse_tcp_proxy_line(void *arg)
tor_free(msg);
/* Bad TCPProxy line - unparsable address/port. */
- ret = parse_tcp_proxy_line("haproxy 95.216.163.36/443", options, &msg);
+ MOCK(tor_addr_lookup, mock_tor_addr_lookup__fail_on_bad_addrs);
+ ret = parse_tcp_proxy_line("haproxy bogus_address!/300", options, &msg);
tt_int_op(ret, OP_EQ, -1);
tt_str_op(msg, OP_EQ, "TCPProxy address/port failed to parse or resolve. "
"Please fix.");
tor_free(msg);
+ UNMOCK(tor_addr_lookup);
/* Good TCPProxy line - ipv4. */
ret = parse_tcp_proxy_line("haproxy 95.216.163.36:443", options, &msg);
@@ -723,7 +725,7 @@ test_config_parse_tcp_proxy_line(void *arg)
tor_free(msg);
done:
- ;
+ UNMOCK(tor_addr_lookup);
}
/**