Store the certsDir of the group which

initializes rabbitmq configuration
This commit is contained in:
Marcial Rosales 2024-11-21 18:55:54 +01:00 committed by Diana Parra Corbacho
parent ca0a450f3b
commit 9b1e762081
1 changed files with 6 additions and 7 deletions

View File

@ -105,6 +105,7 @@ init_per_group(https, Config) ->
CaCertFile = filename:join([CertsDir, "testca", "cacert.pem"]),
WrongCaCertFile = filename:join([CertsDir, "server", "server.pem"]),
[{group, https},
{certsdir, CertsDir},
{oauth_provider_id, <<"uaa">>},
{oauth_provider, build_https_oauth_provider(<<"uaa">>, CaCertFile)},
{oauth_provider_with_issuer, keep_only_issuer_and_ssl_options(
@ -121,6 +122,7 @@ init_per_group(https_down, Config) ->
CaCertFile = filename:join([CertsDir, "testca", "cacert.pem"]),
[{issuer, build_issuer("https")},
{certsdir, CertsDir},
{oauth_provider_id, <<"uaa">>},
{oauth_provider, build_https_oauth_provider(<<"uaa">>, CaCertFile)} | Config];
@ -133,6 +135,7 @@ init_per_group(with_all_oauth_provider_settings, Config) ->
CaCertFile = filename:join([CertsDir, "testca", "cacert.pem"]),
[{with_all_oauth_provider_settings, true},
{certsdir, CertsDir},
{oauth_provider_id, <<"uaa">>},
{oauth_provider, build_https_oauth_provider(<<"uaa">>, CaCertFile)} | Config];
@ -142,6 +145,7 @@ init_per_group(without_all_oauth_providers_settings, Config) ->
CaCertFile = filename:join([CertsDir, "testca", "cacert.pem"]),
[{with_all_oauth_provider_settings, false},
{certsdir, CertsDir},
{oauth_provider_id, <<"uaa">>},
{oauth_provider, keep_only_issuer_and_ssl_options(
build_https_oauth_provider(<<"uaa">>, CaCertFile))} | Config];
@ -281,10 +285,7 @@ init_per_testcase(TestCase, Config0) ->
case ?config(group, Config) of
https ->
start_https_oauth_server(?AUTH_PORT, ?config(rmq_certsdir, Config),
ListOfExpectations);
without_all_oauth_providers_settings ->
start_https_oauth_server(?AUTH_PORT, ?config(rmq_certsdir, Config),
start_https_oauth_server(?AUTH_PORT, ?config(certsdir, Config),
ListOfExpectations);
_ ->
do_nothing
@ -302,8 +303,6 @@ end_per_testcase(_, Config) ->
case ?config(group, Config) of
https ->
stop_https_auth_server();
without_all_oauth_providers_settings ->
stop_https_auth_server();
_ ->
do_nothing
end,