diff options
author | Loïc Hoguin <[email protected]> | 2020-03-26 09:57:10 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-03-26 09:57:10 +0100 |
commit | a7e069e6ff2729d774c712e3ddd01d3348202db6 (patch) | |
tree | ab1a67d72df6214708723f7f6128b0eeb5b298a1 /test/rfc7230_SUITE.erl | |
parent | d1d02a0ebc1a5d9852b7fe5216ac4ce628fb1744 (diff) | |
download | gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.tar.gz gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.tar.bz2 gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.zip |
Fix IPv6 related changes to tests
Turns out we can't rely on IPv4 being available if we set
the socket in IPv6 mode. Instead the origin is modified to
either setup IPv4 or IPv6 depending on the test's needs.
Diffstat (limited to 'test/rfc7230_SUITE.erl')
-rw-r--r-- | test/rfc7230_SUITE.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rfc7230_SUITE.erl b/test/rfc7230_SUITE.erl index d6afb2c..8505d3f 100644 --- a/test/rfc7230_SUITE.erl +++ b/test/rfc7230_SUITE.erl @@ -37,7 +37,7 @@ host_default_port_https(_) -> host_ipv6(_) -> doc("When connecting to a server using an IPv6 address the host " "header must wrap the address with brackets. (RFC7230 5.4, RFC3986 3.2.2)"), - {ok, OriginPid, OriginPort} = init_origin(tcp, http), + {ok, OriginPid, OriginPort} = init_origin(tcp6, http), {ok, ConnPid} = gun:open({0,0,0,0,0,0,0,1}, OriginPort, #{transport => tcp}), {ok, http} = gun:await_up(ConnPid), _ = gun:get(ConnPid, "/"), |