aboutsummaryrefslogtreecommitdiffstats
path: root/test/misc_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-20 15:58:20 +0100
committerLoïc Hoguin <[email protected]>2018-11-20 16:24:56 +0100
commit2915c6d98caeaf031f944927941df8668eb20b5a (patch)
treecf172cdc2b21b4519f2104057b910650e0d54ba5 /test/misc_SUITE.erl
parent36debe707a699f744e676aae3c4de1dd5d95eca4 (diff)
downloadcowboy-2915c6d98caeaf031f944927941df8668eb20b5a.tar.gz
cowboy-2915c6d98caeaf031f944927941df8668eb20b5a.tar.bz2
cowboy-2915c6d98caeaf031f944927941df8668eb20b5a.zip
Silence the expected set_env_missing error
Diffstat (limited to 'test/misc_SUITE.erl')
-rw-r--r--test/misc_SUITE.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/misc_SUITE.erl b/test/misc_SUITE.erl
index 45fb04e..6245636 100644
--- a/test/misc_SUITE.erl
+++ b/test/misc_SUITE.erl
@@ -50,6 +50,13 @@ init_dispatch(_) ->
{"/", hello_h, []}
]}]).
+%% Logger function silencing the expected crash.
+
+error("Ranch listener " ++ _, [set_env_missing|_]) ->
+ ok;
+error(Format, Args) ->
+ error_logger:error_msg(Format, Args).
+
%% Tests.
restart_gracefully(Config) ->
@@ -97,7 +104,9 @@ set_env(Config0) ->
set_env_missing(Config0) ->
doc("Live replace a middleware environment value when env was not provided."),
- Config = cowboy_test:init_http(?FUNCTION_NAME, #{}, Config0),
+ Config = cowboy_test:init_http(?FUNCTION_NAME, #{
+ logger => ?MODULE
+ }, Config0),
try
ConnPid1 = gun_open(Config),
Ref1 = gun:get(ConnPid1, "/"),