Просмотр исходного кода

fix(test): use different http port for testing authz and authn

Shawn 3 лет назад
Родитель
Сommit
fc73f96aeb

+ 3 - 3
apps/emqx_authn/test/emqx_authn_http_SUITE.erl

@@ -26,7 +26,7 @@
 
 -define(PATH, [?CONF_NS_ATOM]).
 
--define(HTTP_PORT, 33333).
+-define(HTTP_PORT, 32333).
 -define(HTTP_PATH, "/auth").
 -define(CREDENTIALS, #{
     username => <<"plain">>,
@@ -178,7 +178,7 @@ t_destroy(_Config) ->
 t_update(_Config) ->
     CorrectConfig = raw_http_auth_config(),
     IncorrectConfig =
-        CorrectConfig#{url => <<"http://127.0.0.1:33333/invalid">>},
+        CorrectConfig#{url => <<"http://127.0.0.1:32333/invalid">>},
 
     {ok, _} = emqx:update_config(
         ?PATH,
@@ -267,7 +267,7 @@ raw_http_auth_config() ->
 
         backend => <<"http">>,
         method => <<"get">>,
-        url => <<"http://127.0.0.1:33333/auth">>,
+        url => <<"http://127.0.0.1:32333/auth">>,
         body => #{<<"username">> => ?PH_USERNAME, <<"password">> => ?PH_PASSWORD},
         headers => #{<<"X-Test-Header">> => <<"Test Value">>}
     }.

+ 2 - 2
apps/emqx_authn/test/emqx_authn_https_SUITE.erl

@@ -26,7 +26,7 @@
 
 -define(PATH, [?CONF_NS_ATOM]).
 
--define(HTTPS_PORT, 33333).
+-define(HTTPS_PORT, 32334).
 -define(HTTPS_PATH, "/auth").
 -define(CREDENTIALS, #{
     username => <<"plain">>,
@@ -148,7 +148,7 @@ raw_https_auth_config(SpecificSSLOpts) ->
 
         backend => <<"http">>,
         method => <<"get">>,
-        url => <<"https://127.0.0.1:33333/auth">>,
+        url => <<"https://127.0.0.1:32334/auth">>,
         body => #{<<"username">> => ?PH_USERNAME, <<"password">> => ?PH_PASSWORD},
         headers => #{<<"X-Test-Header">> => <<"Test Value">>},
         ssl => maps:merge(SSLOpts, SpecificSSLOpts)

+ 1 - 1
apps/emqx_authn/test/emqx_authn_jwt_SUITE.erl

@@ -25,7 +25,7 @@
 
 -define(AUTHN_ID, <<"mechanism:jwt">>).
 
--define(JWKS_PORT, 33333).
+-define(JWKS_PORT, 31333).
 -define(JWKS_PATH, "/jwks.json").
 
 all() ->