Skip to content

Commit

Permalink
Make oauth stories fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Oct 5, 2022
1 parent 818f120 commit c9e8cb0
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions big_tests/tests/oauth_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ all() ->
].

groups() ->
G = [
{token_login, [sequence], token_login_tests()},
{token_revocation, [sequence], token_revocation_tests()},
{provision_token, [], [provision_token_login]},
{commands, [], [revoke_token_cmd_when_no_token,
revoke_token_cmd]},
{cleanup, [], [token_removed_on_user_removal]},
{sasl_mechanisms, [], [check_for_oauth_with_mod_auth_token_not_loaded,
check_for_oauth_with_mod_auth_token_loaded]}
],
ct_helper:repeat_all_until_all_ok(G).
[
{token_login, [sequence], token_login_tests()},
{token_revocation, [sequence], token_revocation_tests()},
{provision_token, [], [provision_token_login]},
{commands, [], [revoke_token_cmd_when_no_token,
revoke_token_cmd]},
{cleanup, [], [token_removed_on_user_removal]},
{sasl_mechanisms, [], [check_for_oauth_with_mod_auth_token_not_loaded,
check_for_oauth_with_mod_auth_token_loaded]}
].

token_login_tests() ->
[
Expand Down Expand Up @@ -137,7 +136,7 @@ end_per_testcase(CaseName, Config) ->
%%

disco_test(Config) ->
escalus:story(
escalus:fresh_story(
Config, [{alice, 1}],
fun(Alice) ->
escalus_client:send(Alice, escalus_stanza:disco_info(domain())),
Expand Down Expand Up @@ -311,7 +310,7 @@ token_removed_on_user_removal(Config) ->
escalus:send(Bob, IQ),
escalus:assert(is_iq_result, [IQ], escalus:wait_for_stanza(Bob))
end,
escalus:story(Config, [{bob, 1}], S),
escalus:fresh_story(Config, [{bob, 1}], S),
%% then token database doesn't contain user's tokens (cleanup is done after IQ result)
mongoose_helper:wait_until(fun() -> get_users_token(Config, bob) end, {selected, []}).

Expand Down

0 comments on commit c9e8cb0

Please sign in to comment.