Drop accidentally duplicated testcase

This commit is contained in:
Andrew Mayorov 2021-02-03 12:51:26 +03:00
parent 3e7e46f93a
commit 502e3ac8de
No known key found for this signature in database
GPG Key ID: 5AB939BC29BDA254

View File

@ -20,8 +20,7 @@
unknown_resources_ok_test/1,
unknown_resources_fail_encode_test/1,
cant_authorize_without_resource_access/1,
no_expiration_claim_allowed/1,
multiple_domains_test/1
no_expiration_claim_allowed/1
]).
-type test_case_name() :: atom().
@ -49,8 +48,7 @@ all() ->
unknown_resources_ok_test,
unknown_resources_fail_encode_test,
cant_authorize_without_resource_access,
no_expiration_claim_allowed,
multiple_domains_test
no_expiration_claim_allowed
].
-spec init_per_suite(config()) -> config().
@ -189,22 +187,6 @@ no_expiration_claim_allowed(_) ->
{ok, Token} = uac_authorizer_jwt:issue(unique_id(), PartyID, #{}, test),
{ok, _} = uac:authorize_api_key(<<"Bearer ", Token/binary>>, #{}).
-spec multiple_domains_test(config()) -> _.
multiple_domains_test(_) ->
ACL = ?TEST_SERVICE_ACL(read),
Domain1 = <<"api-1">>,
Domain2 = <<"api-2">>,
{ok, Token} = issue_token(
#{
Domain1 => uac_acl:from_list(ACL),
Domain2 => uac_acl:from_list(ACL)
},
unlimited
),
{ok, AccessContext} = uac:authorize_api_key(<<"Bearer ", Token/binary>>, #{}),
ok = uac:authorize_operation([], AccessContext, Domain1),
{error, unauthorized} = uac:authorize_operation(?TEST_SERVICE_ACL(write), AccessContext, Domain2).
%%
issue_token(DomainRoles, Expiration) when is_map(DomainRoles) ->