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

This commit is contained in:
Shawn 2022-04-29 11:52:31 +08:00
parent 4a6dabbe57
commit fc73f96aeb
3 changed files with 6 additions and 6 deletions

View File

@ -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">>}
}.

View File

@ -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)

View File

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