aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-04-22 11:43:07 +0200
committerLoïc Hoguin <[email protected]>2019-04-22 11:43:07 +0200
commitb2aed85a2a8794f0cc23755d1a10c602ab289ff4 (patch)
tree7ad69bc7b9214b8c34501fa97d65e8ca1cd72f2f
parentc8567b6d7d2ef475810fe17cd0a080fa38cd0d2c (diff)
downloadgun-b2aed85a2a8794f0cc23755d1a10c602ab289ff4.tar.gz
gun-b2aed85a2a8794f0cc23755d1a10c602ab289ff4.tar.bz2
gun-b2aed85a2a8794f0cc23755d1a10c602ab289ff4.zip
Fix two tests that write to the Gun state directly
-rw-r--r--test/rfc7230_SUITE.erl2
-rw-r--r--test/rfc7540_SUITE.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/rfc7230_SUITE.erl b/test/rfc7230_SUITE.erl
index 07d6b13..e090545 100644
--- a/test/rfc7230_SUITE.erl
+++ b/test/rfc7230_SUITE.erl
@@ -48,7 +48,7 @@ do_host_port(Transport, DefaultPort, HostHeaderPort) ->
{ok, http} = gun:await_up(ConnPid),
%% Change the origin's port in the state to trigger the default port behavior.
_ = sys:replace_state(ConnPid, fun({StateName, StateData}) ->
- {StateName, setelement(7, StateData, DefaultPort)}
+ {StateName, setelement(8, StateData, DefaultPort)}
end, 5000),
%% Confirm the default port is not sent in the request.
_ = gun:get(ConnPid, "/"),
diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl
index 19fc749..543a6f0 100644
--- a/test/rfc7540_SUITE.erl
+++ b/test/rfc7540_SUITE.erl
@@ -60,7 +60,7 @@ do_authority_port(Transport0, DefaultPort, AuthorityHeaderPort) ->
{ok, http2} = gun:await_up(ConnPid),
%% Change the origin's port in the state to trigger the default port behavior.
_ = sys:replace_state(ConnPid, fun({StateName, StateData}) ->
- {StateName, setelement(7, StateData, DefaultPort)}
+ {StateName, setelement(8, StateData, DefaultPort)}
end, 5000),
%% Confirm the default port is not sent in the request.
timer:sleep(100), %% Give enough time for the handshake to fully complete.