diff options
author | Alexander Færøy <ahf@torproject.org> | 2020-11-19 17:43:44 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2020-11-19 17:43:44 +0000 |
commit | 2e7cbd7a9c4672d334a5900be2d2f4be26e603a3 (patch) | |
tree | a9452a3d8d5154da59a8853ac854fa82a9d6cd9b /src | |
parent | 7c0778ef7e05e859c62346a795952f127972b35e (diff) | |
parent | 4154158d79452a5026c25750fae220a529c00fa3 (diff) | |
download | tor-2e7cbd7a9c4672d334a5900be2d2f4be26e603a3.tar.gz tor-2e7cbd7a9c4672d334a5900be2d2f4be26e603a3.zip |
Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3
Diffstat (limited to 'src')
-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 ae3f04de11..8ea744d4fd 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -703,11 +703,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); @@ -720,7 +722,7 @@ test_config_parse_tcp_proxy_line(void *arg) tor_free(msg); done: - ; + UNMOCK(tor_addr_lookup); } /** |