diff options
author | Alexander Færøy <ahf@torproject.org> | 2020-11-19 17:43:59 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2020-11-19 17:43:59 +0000 |
commit | 77bb4b0838da1d1c1cb7d2d47b02954abeb00a21 (patch) | |
tree | 49cccd3a21a1c6c5141740ff56ac37e8d14fa0cb /src/test | |
parent | 90017323942dc56b23d98c34894542e30856aeac (diff) | |
parent | 2e7cbd7a9c4672d334a5900be2d2f4be26e603a3 (diff) | |
download | tor-77bb4b0838da1d1c1cb7d2d47b02954abeb00a21.tar.gz tor-77bb4b0838da1d1c1cb7d2d47b02954abeb00a21.zip |
Merge branch 'maint-0.4.3' into maint-0.4.4
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c index cb0d9bba28..71beb93f67 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -705,11 +705,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); @@ -722,7 +724,7 @@ test_config_parse_tcp_proxy_line(void *arg) tor_free(msg); done: - ; + UNMOCK(tor_addr_lookup); } /** |