+upgrade world (#368)

This commit is contained in:
dinama 2021-02-08 18:36:18 +03:00 committed by GitHub
parent 56ec879993
commit 30025b7b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 408 additions and 435 deletions

2
Jenkinsfile vendored
View File

@ -21,5 +21,5 @@ build('fistful-server', 'docker-host', finalHook) {
pipeErlangService = load("${env.JENKINS_LIB}/pipeErlangService.groovy")
}
pipeErlangService.runPipe(true)
pipeErlangService.runPipe(true, false)
}

View File

@ -17,11 +17,11 @@ SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
# Base image for the service
BASE_IMAGE_NAME := service-erlang
BASE_IMAGE_TAG := 54a794b4875ad79f90dba0a7708190b3b37d584f
BASE_IMAGE_TAG := 51bd5f25d00cbf75616e2d672601dfe7351dcaa4
# Build image tag to be used
BUILD_IMAGE_NAME := build-erlang
BUILD_IMAGE_TAG := 19ff48ccbe09b00b79303fc6e5c63a3a9f8fd859
BUILD_IMAGE_TAG := 61a001bbb48128895735a3ac35b0858484fdb2eb
REGISTRY := dr2.rbkmoney.com
@ -50,7 +50,7 @@ xref: submodules
$(REBAR) xref
lint:
elvis rock
elvis rock -V
check_format:
$(REBAR) fmt -c

View File

@ -27,7 +27,7 @@ rus_domestic_passport(C) ->
Client = ff_woody_client:new(maps:get('identdocstore', ct_helper:cfg(services, C))),
WoodyCtx = ct_helper:get_woody_ctx(C),
Request = {{identdocstore_identity_document_storage_thrift, 'IdentityDocumentStorage'}, 'Put', {Document}},
case woody_client:call(Request, Client, WoodyCtx) of
case ff_woody_client:call(Client, Request, WoodyCtx) of
{ok, Token} ->
{rus_domestic_passport, Token}
end.
@ -43,7 +43,7 @@ rus_retiree_insurance_cert(Number, C) ->
Client = ff_woody_client:new(maps:get('identdocstore', ct_helper:cfg(services, C))),
WoodyCtx = ct_helper:get_woody_ctx(C),
Request = {{identdocstore_identity_document_storage_thrift, 'IdentityDocumentStorage'}, 'Put', {Document}},
case woody_client:call(Request, Client, WoodyCtx) of
case ff_woody_client:call(Client, Request, WoodyCtx) of
{ok, Token} ->
{rus_retiree_insurance_cert, Token}
end.

View File

@ -6,9 +6,10 @@
%% API
-type event(T) :: machinery_mg_eventsink:evsink_event(
ff_machine:timestamped_event(T)
).
-type event(T) ::
machinery_mg_eventsink:evsink_event(
ff_machine:timestamped_event(T)
).
-type sinkevent(T) :: T.
-type options() :: #{publisher := module()}.

View File

@ -8,9 +8,10 @@
-include_lib("mg_proto/include/mg_proto_state_processing_thrift.hrl").
-type event() :: ff_eventsink_publisher:event(p2p_session:event()).
-type sinkevent() :: ff_eventsink_publisher:sinkevent(
ff_proto_p2p_session_thrift:'SinkEvent'()
).
-type sinkevent() ::
ff_eventsink_publisher:sinkevent(
ff_proto_p2p_session_thrift:'SinkEvent'()
).
%%
%% Internals

View File

@ -35,13 +35,14 @@
-type thrift_type_ref() :: {module(), Name :: atom()}.
-type thrift_struct_def() :: list({
Tag :: pos_integer(),
Requireness :: required | optional | undefined,
Type :: thrift_struct_type(),
Name :: atom(),
Default :: any()
}).
-type thrift_struct_def() ::
list({
Tag :: pos_integer(),
Requireness :: required | optional | undefined,
Type :: thrift_struct_type(),
Name :: atom(),
Default :: any()
}).
serialize(Type, Data) ->
{ok, Trans} = thrift_membuffer_transport:new(),

View File

@ -8,9 +8,10 @@
-include_lib("mg_proto/include/mg_proto_state_processing_thrift.hrl").
-type event() :: ff_eventsink_publisher:event(ff_withdrawal_session:event()).
-type sinkevent() :: ff_eventsink_publisher:sinkevent(
ff_proto_withdrawal_session_thrift:'SinkEvent'()
).
-type sinkevent() ::
ff_eventsink_publisher:sinkevent(
ff_proto_withdrawal_session_thrift:'SinkEvent'()
).
%%
%% Internals

View File

@ -15,9 +15,10 @@
-type logic_handler(T) :: machinery:logic_handler(T).
-type timestamp() :: machinery:timestamp().
-type backend_opts() :: machinery:backend_opts(#{
name := atom()
}).
-type backend_opts() ::
machinery:backend_opts(#{
name := atom()
}).
-type backend() :: {?MODULE, backend_opts()}.

View File

@ -25,10 +25,8 @@
cowboy_draining_server,
cowboy_cors,
cowboy_access_log,
base64url,
snowflake,
woody_user_identity,
payproc_errors,
ff_server,
uac,
prometheus,

View File

@ -909,9 +909,19 @@ events_collect_test_() ->
#p2p_transfer_Event{
event = EventID,
occured_at = <<"2020-05-25T12:34:56.123456Z">>,
change = {route, #p2p_transfer_RouteChange{}}
change =
{route, #p2p_transfer_RouteChange{
route = #p2p_transfer_Route{
provider_id = 0
}
}}
}
end,
% Consturct
ConstructEvent = fun
(N) when (N rem 2) == 0 -> Reject(N);
(N) -> Event(N)
end,
meck:new([wapi_handler_utils], [passthrough]),
%
% mock Request: {Service, 'GetEvents', [EntityID, EventRange]},
@ -927,13 +937,7 @@ events_collect_test_() ->
{ok, [Event(N) || N <- lists:seq(After + 1, After + Limit), N rem 2 =:= 0]};
({produce_reject, 'GetEvents', {_, EventRange}}, _Context) ->
#'EventRange'{'after' = After, limit = Limit} = EventRange,
{ok, [
case N rem 2 of
0 -> Reject(N);
_ -> Event(N)
end
|| N <- lists:seq(After + 1, After + Limit)
]};
{ok, [ConstructEvent(N) || N <- lists:seq(After + 1, After + Limit)]};
({produce_range, 'GetEvents', {_, EventRange}}, _Context) ->
#'EventRange'{'after' = After, limit = Limit} = EventRange,
{ok, [Event(N) || N <- lists:seq(After + 1, After + Limit)]};

View File

@ -62,7 +62,9 @@ deadline_from_timeout(Timeout) ->
deadline_is_reached(Deadline) ->
woody_deadline:is_reached(Deadline).
-spec parse_lifetime(binary()) -> {ok, timeout()} | {error, bad_lifetime}.
-spec parse_lifetime
(undefined) -> {error, bad_lifetime};
(binary()) -> {ok, timeout()} | {error, bad_lifetime}.
parse_lifetime(undefined) ->
{error, bad_lifetime};
parse_lifetime(Bin) ->
@ -86,7 +88,8 @@ parse_lifetime(Bin) ->
-spec base64url_to_map(binary()) -> map() | no_return().
base64url_to_map(Base64) when is_binary(Base64) ->
try
jsx:decode(base64url:decode(Base64), [return_maps])
{ok, Json} = jose_base64url:decode(Base64),
jsx:decode(Json, [return_maps])
catch
Class:Reason ->
_ = logger:debug("decoding base64 ~p to map failed with ~p:~p", [Base64, Class, Reason]),
@ -96,7 +99,7 @@ base64url_to_map(Base64) when is_binary(Base64) ->
-spec map_to_base64url(map()) -> binary() | no_return().
map_to_base64url(Map) when is_map(Map) ->
try
base64url:encode(jsx:encode(Map))
jose_base64url:encode(jsx:encode(Map))
catch
Class:Reason ->
_ = logger:debug("encoding map ~p to base64 failed with ~p:~p", [Map, Class, Reason]),

View File

@ -232,7 +232,7 @@ withdrawal_to_bank_card_test(C) ->
ok = check_destination(IdentityID, DestID, Resource, C),
{ok, _Grants} = issue_destination_grants(DestID, C),
% ожидаем выполнения асинхронного вызова выдачи прав на вывод
await_destination(DestID),
_ = await_destination(DestID),
WithdrawalID = create_withdrawal(WalletID, DestID, C),
ok = check_withdrawal(WalletID, DestID, WithdrawalID, C).
@ -252,7 +252,7 @@ withdrawal_to_crypto_wallet_test(C) ->
ok = check_destination(IdentityID, DestID, Resource, C),
{ok, _Grants} = issue_destination_grants(DestID, C),
% ожидаем выполнения асинхронного вызова выдачи прав на вывод
await_destination(DestID),
_ = await_destination(DestID),
WithdrawalID = create_withdrawal(WalletID, DestID, C),
ok = check_withdrawal(WalletID, DestID, WithdrawalID, C).
@ -273,7 +273,7 @@ withdrawal_to_ripple_wallet_test(C) ->
ok = check_destination(IdentityID, DestID, Resource, C),
{ok, _Grants} = issue_destination_grants(DestID, C),
% ожидаем выполнения асинхронного вызова выдачи прав на вывод
await_destination(DestID),
_ = await_destination(DestID),
WithdrawalID = create_withdrawal(WalletID, DestID, C),
ok = check_withdrawal(WalletID, DestID, WithdrawalID, C).
@ -293,7 +293,7 @@ withdrawal_to_ripple_wallet_with_tag_test(C) ->
ok = check_destination(IdentityID, DestID, Resource, C),
{ok, _Grants} = issue_destination_grants(DestID, C),
% ожидаем выполнения асинхронного вызова выдачи прав на вывод
await_destination(DestID),
_ = await_destination(DestID),
WithdrawalID = create_withdrawal(WalletID, DestID, C),
ok = check_withdrawal(WalletID, DestID, WithdrawalID, C).
@ -315,7 +315,7 @@ check_withdrawal_limit_test(C) ->
ok = check_destination(IdentityID, DestID, Resource, C),
{ok, _Grants} = issue_destination_grants(DestID, C),
% ожидаем выполнения асинхронного вызова выдачи прав на вывод
await_destination(DestID),
_ = await_destination(DestID),
{error, {422, #{<<"message">> := <<"Invalid cash amount">>}}} = call_api(
fun swag_client_wallet_withdrawals_api:create_withdrawal/3,
@ -353,7 +353,7 @@ check_withdrawal_limit_exceeded_test(C) ->
await_destination(DestID),
WithdrawalID = create_withdrawal(WalletID, DestID, C, undefined, 100000),
await_final_withdrawal_status(WithdrawalID),
_ = await_final_withdrawal_status(WithdrawalID),
ok = check_withdrawal(WalletID, DestID, WithdrawalID, C, 100000),
?assertMatch(
{ok, #{
@ -548,7 +548,7 @@ quote_withdrawal_test(C) ->
{ok, Dest} = create_destination(IdentityID, Resource, C),
DestID = destination_id(Dest),
% ожидаем авторизации назначения вывода
await_destination(DestID),
_ = await_destination(DestID),
CashFrom = #{
<<"amount">> => 100,
@ -584,15 +584,16 @@ woody_retry_test(C) ->
},
Ctx = wapi_ct_helper:create_auth_ctx(<<"12332">>),
T1 = erlang:monotonic_time(),
try
wapi_wallet_ff_backend:list_wallets(Params, Ctx#{woody_context => ct_helper:get_woody_ctx(C)})
catch
error:{woody_error, {_Source, Class, _Details}} = _Error when
Class =:= resource_unavailable orelse
Class =:= result_unknown
->
ok
end,
_ =
try
wapi_wallet_ff_backend:list_wallets(Params, Ctx#{woody_context => ct_helper:get_woody_ctx(C)})
catch
error:{woody_error, {_Source, Class, _Details}} = _Error when
Class =:= resource_unavailable orelse
Class =:= result_unknown
->
ok
end,
T2 = erlang:monotonic_time(),
Time = erlang:convert_time_unit(T2 - T1, native, micro_seconds),
?assert(Time > 3000000).
@ -928,7 +929,7 @@ check_withdrawal(WalletID, DestID, WithdrawalID, C, Amount) ->
Other
end
end,
{linear, 20, 1000}
genlib_retry:linear(20, 1000)
).
get_withdrawal(WithdrawalID, C) ->
@ -981,7 +982,7 @@ check_w2w_transfer(WalletFromID, WalletToID, W2WTransferID, C) ->
Other
end
end,
{linear, 20, 1000}
genlib_retry:linear(20, 1000)
).
%%

View File

@ -64,8 +64,8 @@ prepare_param(Param) ->
case Param of
{limit, P} -> #{<<"limit">> => genlib:to_binary(P)};
{offset, P} -> #{<<"offset">> => genlib:to_binary(P)};
{from_time, P} -> #{<<"fromTime">> => genlib_format:format_datetime_iso8601(P)};
{to_time, P} -> #{<<"toTime">> => genlib_format:format_datetime_iso8601(P)};
{from_time, P} -> #{<<"fromTime">> => genlib_rfc3339:format(genlib_time:daytime_to_unixtime(P), second)};
{to_time, P} -> #{<<"toTime">> => genlib_rfc3339:format(genlib_time:daytime_to_unixtime(P), second)};
{status, P} -> #{<<"status">> => genlib:to_binary(P)};
{split_unit, P} -> #{<<"splitUnit">> => genlib:to_binary(P)};
{split_size, P} -> #{<<"splitSize">> => genlib:to_binary(P)};

View File

@ -171,7 +171,7 @@ mock_services_(Services, SupPid) when is_pid(SupPid) ->
handlers => lists:map(fun mock_service_handler/1, Services)
}
),
{ok, _} = supervisor:start_child(SupPid, ChildSpec),
_ = supervisor:start_child(SupPid, ChildSpec),
lists:foldl(
fun(Service, Acc) ->
@ -224,7 +224,7 @@ get_lifetime(YY, MM, DD) ->
<<"days">> => DD
}.
-spec create_auth_ctx(ff_party:id()) -> wapi_handler:context().
-spec create_auth_ctx(ff_party:id()) -> map().
create_auth_ctx(PartyID) ->
#{
swagger_context => #{auth_context => {?STRING, PartyID, #{}}}

View File

@ -54,7 +54,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, default}
@ -135,7 +135,7 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
@ -146,7 +146,7 @@ end_per_testcase(_Name, C) ->
-spec create_destination_ok_test(config()) -> _.
create_destination_ok_test(C) ->
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> {ok, Destination} end),
_ = create_destination_start_mocks(C, fun() -> {ok, Destination} end),
?assertMatch(
{ok, _},
create_destination_call_api(C, Destination)
@ -155,7 +155,7 @@ create_destination_ok_test(C) ->
-spec create_destination_fail_resource_token_invalid_test(config()) -> _.
create_destination_fail_resource_token_invalid_test(C) ->
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> {ok, Destination} end),
_ = create_destination_start_mocks(C, fun() -> {ok, Destination} end),
?assertMatch(
{error,
{400, #{
@ -169,7 +169,7 @@ create_destination_fail_resource_token_invalid_test(C) ->
create_destination_fail_resource_token_expire_test(C) ->
InvalidResourceToken = wapi_crypto:create_resource_token(?RESOURCE, wapi_utils:deadline_from_timeout(0)),
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> {ok, Destination} end),
_ = create_destination_start_mocks(C, fun() -> {ok, Destination} end),
?assertMatch(
{error,
{400, #{
@ -182,7 +182,7 @@ create_destination_fail_resource_token_expire_test(C) ->
-spec create_destination_fail_identity_notfound_test(config()) -> _.
create_destination_fail_identity_notfound_test(C) ->
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> throw(#fistful_IdentityNotFound{}) end),
_ = create_destination_start_mocks(C, fun() -> {throwing, #fistful_IdentityNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such identity">>}}},
create_destination_call_api(C, Destination)
@ -191,7 +191,7 @@ create_destination_fail_identity_notfound_test(C) ->
-spec create_destination_fail_currency_notfound_test(config()) -> _.
create_destination_fail_currency_notfound_test(C) ->
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> throw(#fistful_CurrencyNotFound{}) end),
_ = create_destination_start_mocks(C, fun() -> {throwing, #fistful_CurrencyNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Currency not supported">>}}},
create_destination_call_api(C, Destination)
@ -200,7 +200,7 @@ create_destination_fail_currency_notfound_test(C) ->
-spec create_destination_fail_party_inaccessible_test(config()) -> _.
create_destination_fail_party_inaccessible_test(C) ->
Destination = make_destination(C, bank_card),
create_destination_start_mocks(C, fun() -> throw(#fistful_PartyInaccessible{}) end),
_ = create_destination_start_mocks(C, fun() -> {throwing, #fistful_PartyInaccessible{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Identity inaccessible">>}}},
create_destination_call_api(C, Destination)
@ -209,7 +209,7 @@ create_destination_fail_party_inaccessible_test(C) ->
-spec get_destination_ok_test(config()) -> _.
get_destination_ok_test(C) ->
Destination = make_destination(C, bank_card),
get_destination_start_mocks(C, fun() -> {ok, Destination} end),
_ = get_destination_start_mocks(C, fun() -> {ok, Destination} end),
?assertMatch(
{ok, _},
get_destination_call_api(C)
@ -217,7 +217,7 @@ get_destination_ok_test(C) ->
-spec get_destination_fail_notfound_test(config()) -> _.
get_destination_fail_notfound_test(C) ->
get_destination_start_mocks(C, fun() -> throw(#fistful_DestinationNotFound{}) end),
_ = get_destination_start_mocks(C, fun() -> {throwing, #fistful_DestinationNotFound{}} end),
?assertEqual(
{error, {404, #{}}},
get_destination_call_api(C)
@ -316,7 +316,7 @@ do_destination_lifecycle(ResourceType, C) ->
Resource = generate_resource(ResourceType),
Context = generate_context(PartyID),
Destination = generate_destination(Identity#idnt_IdentityState.id, Resource, Context),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end},
{fistful_destination, fun
@ -509,7 +509,7 @@ make_destination(C, ResourceType) ->
create_destination_start_mocks(C, CreateDestinationResultFun) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end},
{fistful_destination, fun('Create', _) -> CreateDestinationResultFun() end}
@ -518,7 +518,7 @@ create_destination_start_mocks(C, CreateDestinationResultFun) ->
).
get_destination_start_mocks(C, GetDestinationResultFun) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_destination, fun('Get', _) -> GetDestinationResultFun() end}
],

View File

@ -4,6 +4,12 @@
-export([handle_function/4]).
-spec handle_function(woody:func(), woody:args(), woody_context:ctx(), #{}) -> {ok, term()}.
-spec handle_function(woody:func(), woody:args(), woody_context:ctx(), woody:options()) ->
{ok, woody:result()} | no_return().
handle_function(FunName, Args, _, #{function := Fun}) ->
Fun(FunName, Args).
case Fun(FunName, Args) of
{throwing, Exception} ->
erlang:throw(Exception);
Result ->
Result
end.

View File

@ -62,7 +62,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -148,17 +148,16 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)).
%%% Tests
-spec create_identity(config()) -> _.
create_identity(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Create', _) -> {ok, ?IDENTITY(PartyID)} end}
],
@ -168,9 +167,9 @@ create_identity(C) ->
-spec create_identity_provider_notfound(config()) -> _.
create_identity_provider_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Create', _) -> throw(#fistful_ProviderNotFound{}) end}
{fistful_identity, fun('Create', _) -> {throwing, #fistful_ProviderNotFound{}} end}
],
C
),
@ -181,9 +180,9 @@ create_identity_provider_notfound(C) ->
-spec create_identity_class_notfound(config()) -> _.
create_identity_class_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Create', _) -> throw(#fistful_IdentityClassNotFound{}) end}
{fistful_identity, fun('Create', _) -> {throwing, #fistful_IdentityClassNotFound{}} end}
],
C
),
@ -194,9 +193,9 @@ create_identity_class_notfound(C) ->
-spec create_identity_party_inaccessible(config()) -> _.
create_identity_party_inaccessible(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Create', _) -> throw(#fistful_PartyInaccessible{}) end}
{fistful_identity, fun('Create', _) -> {throwing, #fistful_PartyInaccessible{}} end}
],
C
),
@ -208,7 +207,7 @@ create_identity_party_inaccessible(C) ->
-spec create_identity_thrift_name(config()) -> _.
create_identity_thrift_name(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Create', _) ->
{ok, ?IDENTITY(PartyID, ?DEFAULT_CONTEXT_NO_NAME(PartyID))}
@ -221,7 +220,7 @@ create_identity_thrift_name(C) ->
-spec get_identity(config()) -> _.
get_identity(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Get', _) -> {ok, ?IDENTITY(PartyID)} end}
],
@ -231,9 +230,9 @@ get_identity(C) ->
-spec get_identity_notfound(config()) -> _.
get_identity_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('Get', _) -> throw(#fistful_IdentityNotFound{}) end}
{fistful_identity, fun('Get', _) -> {throwing, #fistful_IdentityNotFound{}} end}
],
C
),
@ -244,7 +243,7 @@ get_identity_notfound(C) ->
-spec create_identity_challenge(config()) -> _.
create_identity_challenge(C) ->
create_identity_challenge_start_mocks(
_ = create_identity_challenge_start_mocks(
C,
fun() -> {ok, ?IDENTITY_CHALLENGE(?IDENTITY_CHALLENGE_STATUS_COMPLETED)} end
),
@ -252,7 +251,7 @@ create_identity_challenge(C) ->
-spec create_identity_challenge_identity_notfound(config()) -> _.
create_identity_challenge_identity_notfound(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_IdentityNotFound{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_IdentityNotFound{}} end),
?assertEqual(
{error, {404, #{}}},
create_identity_challenge_call_api(C)
@ -260,7 +259,7 @@ create_identity_challenge_identity_notfound(C) ->
-spec create_identity_challenge_challenge_pending(config()) -> _.
create_identity_challenge_challenge_pending(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ChallengePending{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ChallengePending{}} end),
?assertEqual(
{error, {409, #{}}},
create_identity_challenge_call_api(C)
@ -268,7 +267,7 @@ create_identity_challenge_challenge_pending(C) ->
-spec create_identity_challenge_class_notfound(config()) -> _.
create_identity_challenge_class_notfound(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ChallengeClassNotFound{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ChallengeClassNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such challenge type">>}}},
create_identity_challenge_call_api(C)
@ -276,7 +275,7 @@ create_identity_challenge_class_notfound(C) ->
-spec create_identity_challenge_level_incorrect(config()) -> _.
create_identity_challenge_level_incorrect(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ChallengeLevelIncorrect{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ChallengeLevelIncorrect{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Illegal identification type for current identity level">>}}},
create_identity_challenge_call_api(C)
@ -284,7 +283,7 @@ create_identity_challenge_level_incorrect(C) ->
-spec create_identity_challenge_conflict(config()) -> _.
create_identity_challenge_conflict(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ChallengeConflict{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ChallengeConflict{}} end),
?assertEqual(
{error, {409, #{}}},
create_identity_challenge_call_api(C)
@ -292,7 +291,7 @@ create_identity_challenge_conflict(C) ->
-spec create_identity_challenge_proof_notfound(config()) -> _.
create_identity_challenge_proof_notfound(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ProofNotFound{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ProofNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Proof not found">>}}},
create_identity_challenge_call_api(C)
@ -300,7 +299,7 @@ create_identity_challenge_proof_notfound(C) ->
-spec create_identity_challenge_proof_insufficient(config()) -> _.
create_identity_challenge_proof_insufficient(C) ->
create_identity_challenge_start_mocks(C, fun() -> throw(#fistful_ProofInsufficient{}) end),
_ = create_identity_challenge_start_mocks(C, fun() -> {throwing, #fistful_ProofInsufficient{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Insufficient proof">>}}},
create_identity_challenge_call_api(C)
@ -309,7 +308,7 @@ create_identity_challenge_proof_insufficient(C) ->
-spec get_identity_challenge(config()) -> _.
get_identity_challenge(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -333,7 +332,7 @@ get_identity_challenge(C) ->
-spec list_identity_challenges(config()) -> _.
list_identity_challenges(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -359,11 +358,11 @@ list_identity_challenges(C) ->
-spec list_identity_challenges_identity_notfound(config()) -> _.
list_identity_challenges_identity_notfound(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
('GetChallenges', _) -> throw(#fistful_IdentityNotFound{})
('GetChallenges', _) -> {throwing, #fistful_IdentityNotFound{}}
end},
{identdoc_storage, fun('Get', _) -> {ok, ?IDENT_DOC} end}
],
@ -388,7 +387,7 @@ list_identity_challenges_identity_notfound(C) ->
-spec get_identity_challenge_event(config()) -> _.
get_identity_challenge_event(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -412,7 +411,7 @@ get_identity_challenge_event(C) ->
-spec poll_identity_challenge_events(config()) -> _.
poll_identity_challenge_events(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -426,11 +425,11 @@ poll_identity_challenge_events(C) ->
-spec poll_identity_challenge_events_identity_notfound(config()) -> _.
poll_identity_challenge_events_identity_notfound(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
('GetEvents', _) -> throw(#fistful_IdentityNotFound{})
('GetEvents', _) -> {throwing, #fistful_IdentityNotFound{}}
end}
],
C

View File

@ -50,7 +50,7 @@ init([]) ->
%% Configure tests
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -133,10 +133,10 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%% Tests
@ -144,7 +144,7 @@ end_per_testcase(_Name, C) ->
-spec create_ok_test(config()) -> _.
create_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end},
{fistful_p2p_template, fun('Create', _) -> {ok, ?P2P_TEMPLATE(PartyID)} end}
@ -177,7 +177,7 @@ create_ok_test(C) ->
-spec get_ok_test(config()) -> _.
get_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun('Get', _) -> {ok, ?P2P_TEMPLATE(PartyID)} end}
],
@ -196,7 +196,7 @@ get_ok_test(C) ->
-spec block_ok_test(config()) -> _.
block_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun('Get', _) -> {ok, ?P2P_TEMPLATE(PartyID)} end}
],
@ -215,7 +215,7 @@ block_ok_test(C) ->
-spec issue_access_token_ok_test(config()) -> _.
issue_access_token_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -241,7 +241,7 @@ issue_access_token_ok_test(C) ->
-spec issue_transfer_ticket_ok_test(config()) -> _.
issue_transfer_ticket_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -268,7 +268,7 @@ issue_transfer_ticket_ok_test(C) ->
-spec issue_transfer_ticket_with_access_expiration_ok_test(config()) -> _.
issue_transfer_ticket_with_access_expiration_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -296,7 +296,7 @@ issue_transfer_ticket_with_access_expiration_ok_test(C) ->
-spec quote_transfer_ok_test(config()) -> _.
quote_transfer_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -310,7 +310,7 @@ quote_transfer_ok_test(C) ->
-spec quote_transfer_fail_resource_token_invalid_test(config()) -> _.
quote_transfer_fail_resource_token_invalid_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end}
],
@ -338,7 +338,7 @@ quote_transfer_fail_resource_token_invalid_test(C) ->
-spec quote_transfer_fail_resource_token_expire_test(config()) -> _.
quote_transfer_fail_resource_token_expire_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end}
],
@ -366,7 +366,7 @@ quote_transfer_fail_resource_token_expire_test(C) ->
-spec create_transfer_ok_test(config()) -> _.
create_transfer_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -384,7 +384,7 @@ create_transfer_ok_test(C) ->
-spec create_transfer_fail_resource_token_invalid_test(config()) -> _.
create_transfer_fail_resource_token_invalid_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -418,7 +418,7 @@ create_transfer_fail_resource_token_invalid_test(C) ->
-spec create_transfer_fail_resource_token_expire_test(config()) -> _.
create_transfer_fail_resource_token_expire_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_template, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};

View File

@ -57,7 +57,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, p2p}
@ -151,7 +151,7 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),

View File

@ -65,7 +65,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -161,22 +161,22 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
-spec create_ok_test(config()) -> _.
create_ok_test(C) ->
create_ok_start_mocks(C),
_ = create_ok_start_mocks(C),
{ok, _} = create_p2p_transfer_call_api(C).
-spec create_fail_resource_token_invalid_test(config()) -> _.
create_fail_resource_token_invalid_test(C) ->
create_ok_start_mocks(C),
_ = create_ok_start_mocks(C),
InvalidToken = <<"v1.InvalidToken">>,
ValidToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
?assertMatch(
@ -198,7 +198,7 @@ create_fail_resource_token_invalid_test(C) ->
-spec create_fail_resource_token_expire_test(config()) -> _.
create_fail_resource_token_expire_test(C) ->
create_ok_start_mocks(C),
_ = create_ok_start_mocks(C),
InvalidToken = store_bank_card(wapi_utils:deadline_from_timeout(0)),
ValidToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
?assertMatch(
@ -221,7 +221,7 @@ create_fail_resource_token_expire_test(C) ->
-spec create_fail_unauthorized_test(config()) -> _.
create_fail_unauthorized_test(C) ->
WrongPartyID = <<"SomeWrongPartyID">>,
create_ok_start_mocks(C, WrongPartyID),
_ = create_ok_start_mocks(C, WrongPartyID),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such identity">>}}},
create_p2p_transfer_call_api(C)
@ -229,7 +229,7 @@ create_fail_unauthorized_test(C) ->
-spec create_fail_identity_notfound_test(config()) -> _.
create_fail_identity_notfound_test(C) ->
create_fail_start_mocks(C, fun() -> throw(#fistful_IdentityNotFound{}) end),
_ = create_fail_start_mocks(C, fun() -> {throwing, #fistful_IdentityNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such identity">>}}},
create_p2p_transfer_call_api(C)
@ -243,7 +243,7 @@ create_fail_forbidden_operation_currency_test(C) ->
#'CurrencyRef'{symbolic_code = ?RUB}
]
},
create_fail_start_mocks(C, fun() -> throw(ForbiddenOperationCurrencyException) end),
_ = create_fail_start_mocks(C, fun() -> {throwing, ForbiddenOperationCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Currency not allowed">>}}},
create_p2p_transfer_call_api(C)
@ -258,7 +258,7 @@ create_fail_forbidden_operation_amount_test(C) ->
lower = {inclusive, ?CASH}
}
},
create_fail_start_mocks(C, fun() -> throw(ForbiddenOperationAmountException) end),
_ = create_fail_start_mocks(C, fun() -> {throwing, ForbiddenOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Transfer amount is out of allowed range">>}}},
create_p2p_transfer_call_api(C)
@ -266,7 +266,7 @@ create_fail_forbidden_operation_amount_test(C) ->
-spec create_fail_operation_not_permitted_test(config()) -> _.
create_fail_operation_not_permitted_test(C) ->
create_fail_start_mocks(C, fun() -> throw(#fistful_OperationNotPermitted{}) end),
_ = create_fail_start_mocks(C, fun() -> {throwing, #fistful_OperationNotPermitted{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Operation not permitted">>}}},
create_p2p_transfer_call_api(C)
@ -277,7 +277,7 @@ create_fail_no_resource_info_test(C) ->
NoResourceInfoException = #p2p_transfer_NoResourceInfo{
type = sender
},
create_fail_start_mocks(C, fun() -> throw(NoResourceInfoException) end),
_ = create_fail_start_mocks(C, fun() -> {throwing, NoResourceInfoException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid sender resource">>}}},
create_p2p_transfer_call_api(C)
@ -286,7 +286,7 @@ create_fail_no_resource_info_test(C) ->
-spec create_quote_ok_test(config()) -> _.
create_quote_ok_test(C) ->
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
_ = get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
{ok, #{<<"token">> := Token}} = quote_p2p_transfer_call_api(C, IdentityID),
{ok, {_, _, Payload}} = uac_authorizer_jwt:verify(Token, #{}),
{ok, #p2p_transfer_Quote{identity_id = IdentityID}} = wapi_p2p_quote:decode_token_payload(Payload).
@ -294,7 +294,7 @@ create_quote_ok_test(C) ->
-spec create_quote_fail_resource_token_invalid_test(config()) -> _.
create_quote_fail_resource_token_invalid_test(C) ->
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
_ = get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
InvalidToken = <<"v1.InvalidToken">>,
ValidToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
?assertMatch(
@ -317,7 +317,7 @@ create_quote_fail_resource_token_invalid_test(C) ->
-spec create_quote_fail_resource_token_expire_test(config()) -> _.
create_quote_fail_resource_token_expire_test(C) ->
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
_ = get_quote_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER_QUOTE(IdentityID)} end),
InvalidToken = store_bank_card(wapi_utils:deadline_from_timeout(0)),
ValidToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
?assertMatch(
@ -341,7 +341,7 @@ create_quote_fail_resource_token_expire_test(C) ->
create_with_quote_token_ok_test(C) ->
IdentityID = <<"id">>,
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{bender_thrift, fun('GenerateID', _) -> {ok, ?GENERATE_ID_RESULT} end},
{fistful_identity, fun
@ -388,7 +388,7 @@ create_with_quote_token_ok_test(C) ->
-spec create_with_bad_quote_token_fail_test(config()) -> _.
create_with_bad_quote_token_fail_test(C) ->
create_ok_start_mocks(C),
_ = create_ok_start_mocks(C),
SenderToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
ReceiverToken = store_bank_card(C, <<"4150399999000900">>, <<"12/2025">>, <<"Buka Bjaka">>),
{error,
@ -425,7 +425,7 @@ create_with_bad_quote_token_fail_test(C) ->
-spec get_quote_fail_identity_not_found_test(config()) -> _.
get_quote_fail_identity_not_found_test(C) ->
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> throw(#fistful_IdentityNotFound{}) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, #fistful_IdentityNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such identity">>}}},
quote_p2p_transfer_call_api(C, IdentityID)
@ -440,7 +440,7 @@ get_quote_fail_forbidden_operation_currency_test(C) ->
]
},
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> throw(ForbiddenOperationCurrencyException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, ForbiddenOperationCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Currency not allowed">>}}},
quote_p2p_transfer_call_api(C, IdentityID)
@ -456,7 +456,7 @@ get_quote_fail_forbidden_operation_amount_test(C) ->
}
},
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> throw(ForbiddenOperationAmountException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, ForbiddenOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Transfer amount is out of allowed range">>}}},
quote_p2p_transfer_call_api(C, IdentityID)
@ -465,7 +465,7 @@ get_quote_fail_forbidden_operation_amount_test(C) ->
-spec get_quote_fail_operation_not_permitted_test(config()) -> _.
get_quote_fail_operation_not_permitted_test(C) ->
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> throw(#fistful_OperationNotPermitted{}) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, #fistful_OperationNotPermitted{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Operation not permitted">>}}},
quote_p2p_transfer_call_api(C, IdentityID)
@ -477,7 +477,7 @@ get_quote_fail_no_resource_info_test(C) ->
type = sender
},
IdentityID = <<"id">>,
get_quote_start_mocks(C, fun() -> throw(NoResourceInfoException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, NoResourceInfoException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid sender resource">>}}},
quote_p2p_transfer_call_api(C, IdentityID)
@ -486,12 +486,12 @@ get_quote_fail_no_resource_info_test(C) ->
-spec get_ok_test(config()) -> _.
get_ok_test(C) ->
PartyID = ?config(party, C),
get_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER(PartyID)} end),
_ = get_start_mocks(C, fun() -> {ok, ?P2P_TRANSFER(PartyID)} end),
{ok, _} = get_call_api(C).
-spec get_fail_p2p_notfound_test(config()) -> _.
get_fail_p2p_notfound_test(C) ->
get_start_mocks(C, fun() -> throw(#fistful_P2PNotFound{}) end),
_ = get_start_mocks(C, fun() -> {throwing, #fistful_P2PNotFound{}} end),
?assertEqual(
{error, {404, #{}}},
get_call_api(C)
@ -500,7 +500,7 @@ get_fail_p2p_notfound_test(C) ->
-spec get_events_ok(config()) -> _.
get_events_ok(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_transfer, fun
('GetContext', _) ->
@ -527,16 +527,15 @@ get_events_ok(C) ->
-spec get_events_fail(config()) -> _.
get_events_fail(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_p2p_transfer, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
('Get', _) -> throw(#fistful_P2PNotFound{})
('Get', _) -> {throwing, #fistful_P2PNotFound{}}
end}
],
C
),
?assertMatch({error, {404, #{}}}, get_events_call_api(C)).
%%

View File

@ -42,7 +42,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -116,17 +116,17 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
-spec get_provider_ok(config()) -> _.
get_provider_ok(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_provider, fun('GetProvider', _) -> {ok, ?PROVIDER} end}
],
@ -144,9 +144,9 @@ get_provider_ok(C) ->
-spec get_provider_fail_notfound(config()) -> _.
get_provider_fail_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_provider, fun('GetProvider', _) -> throw(#fistful_ProviderNotFound{}) end}
{fistful_provider, fun('GetProvider', _) -> {throwing, #fistful_ProviderNotFound{}} end}
],
C
),
@ -162,7 +162,7 @@ get_provider_fail_notfound(C) ->
-spec list_providers(config()) -> _.
list_providers(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_provider, fun('ListProviders', _) -> {ok, [?PROVIDER, ?PROVIDER]} end}
],
@ -180,7 +180,7 @@ list_providers(C) ->
-spec get_provider_identity_classes(config()) -> _.
get_provider_identity_classes(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_provider, fun('GetProvider', _) -> {ok, ?PROVIDER} end}
],
@ -198,7 +198,7 @@ get_provider_identity_classes(C) ->
-spec get_provider_identity_class(config()) -> _.
get_provider_identity_class(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_provider, fun('GetProvider', _) -> {ok, ?PROVIDER} end}
],

View File

@ -45,7 +45,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -115,17 +115,17 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
-spec create_report_ok_test(config()) -> _.
create_report_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_report, fun
('GenerateReport', _) -> {ok, ?REPORT_ID};
@ -153,7 +153,7 @@ create_report_ok_test(C) ->
-spec get_report_ok_test(config()) -> _.
get_report_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_report, fun('GetReport', _) -> {ok, ?REPORT} end},
{fistful_identity, fun('Get', _) -> {ok, ?IDENTITY(PartyID)} end}
@ -174,7 +174,7 @@ get_report_ok_test(C) ->
-spec get_reports_ok_test(config()) -> _.
get_reports_ok_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_report, fun('GetReports', _) ->
{ok, [
@ -205,14 +205,14 @@ get_reports_ok_test(C) ->
-spec reports_with_wrong_identity_ok_test(config()) -> _.
reports_with_wrong_identity_ok_test(C) ->
IdentityID = <<"WrongIdentity">>,
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_report, fun
('GenerateReport', _) -> {ok, ?REPORT_ID};
('GetReport', _) -> {ok, ?REPORT};
('GetReports', _) -> {ok, [?REPORT, ?REPORT, ?REPORT]}
end},
{fistful_identity, fun('Get', _) -> throw(#fistful_IdentityNotFound{}) end}
{fistful_identity, fun('Get', _) -> {throwing, #fistful_IdentityNotFound{}} end}
],
C
),
@ -257,7 +257,7 @@ reports_with_wrong_identity_ok_test(C) ->
-spec download_file_ok_test(config()) -> _.
download_file_ok_test(C) ->
wapi_ct_helper:mock_services([{file_storage, fun('GenerateDownloadUrl', _) -> {ok, ?STRING} end}], C),
_ = wapi_ct_helper:mock_services([{file_storage, fun('GenerateDownloadUrl', _) -> {ok, ?STRING} end}], C),
{ok, _} = call_api(
fun swag_client_wallet_downloads_api:download_file/3,
#{

View File

@ -51,7 +51,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -135,17 +135,17 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
-spec list_wallets(config()) -> _.
list_wallets(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, fun('GetWallets', _) -> {ok, ?STAT_RESPONCE(?STAT_WALLETS)} end}
],
@ -163,23 +163,19 @@ list_wallets(C) ->
-spec list_wallets_invalid_error(config()) -> _.
list_wallets_invalid_error(C) ->
MockFunc = fun('GetWallets', _) ->
woody_error:raise(business, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>]))
end,
MockFunc = fun('GetWallets', _) -> {throwing, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>])} end,
SwagFunc = fun swag_client_wallet_wallets_api:list_wallets/3,
check_invalid_error(MockFunc, SwagFunc, C).
-spec list_wallets_bad_token_error(config()) -> _.
list_wallets_bad_token_error(C) ->
MockFunc = fun('GetWallets', _) ->
woody_error:raise(business, ?STAT_BADTOKEN_EXCEPTION)
end,
MockFunc = fun('GetWallets', _) -> {throwing, ?STAT_BADTOKEN_EXCEPTION} end,
SwagFunc = fun swag_client_wallet_wallets_api:list_wallets/3,
check_bad_token_error(MockFunc, SwagFunc, C).
-spec list_withdrawals(config()) -> _.
list_withdrawals(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, fun('GetWithdrawals', _) -> {ok, ?STAT_RESPONCE(?STAT_WITHDRAWALS)} end}
],
@ -197,23 +193,19 @@ list_withdrawals(C) ->
-spec list_withdrawals_invalid_error(config()) -> _.
list_withdrawals_invalid_error(C) ->
MockFunc = fun('GetWithdrawals', _) ->
woody_error:raise(business, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>]))
end,
MockFunc = fun('GetWithdrawals', _) -> {throwing, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>])} end,
SwagFunc = fun swag_client_wallet_withdrawals_api:list_withdrawals/3,
check_invalid_error(MockFunc, SwagFunc, C).
-spec list_withdrawals_bad_token_error(config()) -> _.
list_withdrawals_bad_token_error(C) ->
MockFunc = fun('GetWithdrawals', _) ->
woody_error:raise(business, ?STAT_BADTOKEN_EXCEPTION)
end,
MockFunc = fun('GetWithdrawals', _) -> {throwing, ?STAT_BADTOKEN_EXCEPTION} end,
SwagFunc = fun swag_client_wallet_withdrawals_api:list_withdrawals/3,
check_bad_token_error(MockFunc, SwagFunc, C).
-spec list_deposits(config()) -> _.
list_deposits(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, fun('GetDeposits', _) -> {ok, ?STAT_RESPONCE(?STAT_DEPOSITS)} end}
],
@ -231,23 +223,19 @@ list_deposits(C) ->
-spec list_deposits_invalid_error(config()) -> _.
list_deposits_invalid_error(C) ->
MockFunc = fun('GetDeposits', _) ->
woody_error:raise(business, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>]))
end,
MockFunc = fun('GetDeposits', _) -> {throwing, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>])} end,
SwagFunc = fun swag_client_wallet_deposits_api:list_deposits/3,
check_invalid_error(MockFunc, SwagFunc, C).
-spec list_deposits_bad_token_error(config()) -> _.
list_deposits_bad_token_error(C) ->
MockFunc = fun('GetDeposits', _) ->
woody_error:raise(business, ?STAT_BADTOKEN_EXCEPTION)
end,
MockFunc = fun('GetDeposits', _) -> {throwing, ?STAT_BADTOKEN_EXCEPTION} end,
SwagFunc = fun swag_client_wallet_deposits_api:list_deposits/3,
check_bad_token_error(MockFunc, SwagFunc, C).
-spec list_destinations(config()) -> _.
list_destinations(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, fun('GetDestinations', _) -> {ok, ?STAT_RESPONCE(?STAT_DESTINATIONS)} end}
],
@ -265,23 +253,19 @@ list_destinations(C) ->
-spec list_destinations_invalid_error(config()) -> _.
list_destinations_invalid_error(C) ->
MockFunc = fun('GetDestinations', _) ->
woody_error:raise(business, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>]))
end,
MockFunc = fun('GetDestinations', _) -> {throwing, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>])} end,
SwagFunc = fun swag_client_wallet_withdrawals_api:list_destinations/3,
check_invalid_error(MockFunc, SwagFunc, C).
-spec list_destinations_bad_token_error(config()) -> _.
list_destinations_bad_token_error(C) ->
MockFunc = fun('GetDestinations', _) ->
woody_error:raise(business, ?STAT_BADTOKEN_EXCEPTION)
end,
MockFunc = fun('GetDestinations', _) -> {throwing, ?STAT_BADTOKEN_EXCEPTION} end,
SwagFunc = fun swag_client_wallet_withdrawals_api:list_destinations/3,
check_bad_token_error(MockFunc, SwagFunc, C).
-spec list_identities(config()) -> _.
list_identities(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, fun('GetIdentities', _) -> {ok, ?STAT_RESPONCE(?STAT_IDENTITIES)} end}
],
@ -299,17 +283,13 @@ list_identities(C) ->
-spec list_identities_invalid_error(config()) -> _.
list_identities_invalid_error(C) ->
MockFunc = fun('GetIdentities', _) ->
woody_error:raise(business, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>]))
end,
MockFunc = fun('GetIdentities', _) -> {throwing, ?STAT_INVALID_EXCEPTION([<<"Error 1">>, <<"Error 2">>])} end,
SwagFunc = fun swag_client_wallet_identities_api:list_identities/3,
check_invalid_error(MockFunc, SwagFunc, C).
-spec list_identities_bad_token_error(config()) -> _.
list_identities_bad_token_error(C) ->
MockFunc = fun('GetIdentities', _) ->
woody_error:raise(business, ?STAT_BADTOKEN_EXCEPTION)
end,
MockFunc = fun('GetIdentities', _) -> {throwing, ?STAT_BADTOKEN_EXCEPTION} end,
SwagFunc = fun swag_client_wallet_identities_api:list_identities/3,
check_bad_token_error(MockFunc, SwagFunc, C).
@ -322,7 +302,7 @@ check_bad_token_error(MockFunc, SwagFunc, C) ->
check_error(<<"InvalidToken">>, MockFunc, SwagFunc, C).
check_error(Error, MockFunc, SwagFunc, C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_stat, MockFunc}
],

View File

@ -49,7 +49,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -127,10 +127,10 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
@ -138,13 +138,13 @@ end_per_testcase(_Name, C) ->
-spec create_ok_test(config()) -> _.
create_ok_test(C) ->
PartyID = ?config(party, C),
create_w2_w_transfer_start_mocks(C, fun() -> {ok, ?W2W_TRANSFER(PartyID)} end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {ok, ?W2W_TRANSFER(PartyID)} end),
{ok, _} = create_w2_w_transfer_call_api(C).
-spec create_fail_unauthorized_wallet_test(config()) -> _.
create_fail_unauthorized_wallet_test(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{bender_thrift, fun('GenerateID', _) -> {ok, ?GENERATE_ID_RESULT} end},
{fistful_wallet, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(<<"someotherparty">>)} end},
@ -162,7 +162,7 @@ create_fail_wallet_notfound_test(C) ->
WalletNotFoundException = #fistful_WalletNotFound{
id = ?STRING
},
create_w2_w_transfer_start_mocks(C, fun() -> throw(WalletNotFoundException) end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {throwing, WalletNotFoundException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such wallet sender">>}}},
create_w2_w_transfer_call_api(C)
@ -173,7 +173,7 @@ create_fail_invalid_operation_amount_test(C) ->
InvalidOperationAmountException = #fistful_InvalidOperationAmount{
amount = ?CASH
},
create_w2_w_transfer_start_mocks(C, fun() -> throw(InvalidOperationAmountException) end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {throwing, InvalidOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Bad transfer amount">>}}},
create_w2_w_transfer_call_api(C)
@ -187,7 +187,7 @@ create_fail_forbidden_operation_currency_test(C) ->
#'CurrencyRef'{symbolic_code = ?RUB}
]
},
create_w2_w_transfer_start_mocks(C, fun() -> throw(ForbiddenOperationCurrencyException) end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {throwing, ForbiddenOperationCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Currency not allowed">>}}},
create_w2_w_transfer_call_api(C)
@ -206,7 +206,7 @@ create_fail_inconsistent_w2w_transfer_currency_test(C) ->
symbolic_code = ?RUB
}
},
create_w2_w_transfer_start_mocks(C, fun() -> throw(InconsistentW2WCurrencyException) end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {throwing, InconsistentW2WCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Inconsistent currency">>}}},
create_w2_w_transfer_call_api(C)
@ -217,7 +217,7 @@ create_fail_wallet_inaccessible_test(C) ->
WalletInaccessibleException = #fistful_WalletInaccessible{
id = ?STRING
},
create_w2_w_transfer_start_mocks(C, fun() -> throw(WalletInaccessibleException) end),
_ = create_w2_w_transfer_start_mocks(C, fun() -> {throwing, WalletInaccessibleException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Wallet inaccessible">>}}},
create_w2_w_transfer_call_api(C)
@ -226,12 +226,12 @@ create_fail_wallet_inaccessible_test(C) ->
-spec get_ok_test(config()) -> _.
get_ok_test(C) ->
PartyID = ?config(party, C),
get_w2_w_transfer_start_mocks(C, fun() -> {ok, ?W2W_TRANSFER(PartyID)} end),
_ = get_w2_w_transfer_start_mocks(C, fun() -> {ok, ?W2W_TRANSFER(PartyID)} end),
{ok, _} = get_w2_w_transfer_call_api(C).
-spec get_fail_w2w_notfound_test(config()) -> _.
get_fail_w2w_notfound_test(C) ->
get_w2_w_transfer_start_mocks(C, fun() -> throw(#fistful_W2WNotFound{}) end),
_ = get_w2_w_transfer_start_mocks(C, fun() -> {throwing, #fistful_W2WNotFound{}} end),
?assertMatch(
{error, {404, #{}}},
get_w2_w_transfer_call_api(C)

View File

@ -50,7 +50,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -129,10 +129,10 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
@ -140,12 +140,12 @@ end_per_testcase(_Name, C) ->
-spec create_ok(config()) -> _.
create_ok(C) ->
PartyID = ?config(party, C),
create_wallet_start_mocks(C, fun() -> {ok, ?WALLET(PartyID)} end),
_ = create_wallet_start_mocks(C, fun() -> {ok, ?WALLET(PartyID)} end),
{ok, _} = create_wallet_call_api(C).
-spec create_fail_identity_notfound(config()) -> _.
create_fail_identity_notfound(C) ->
create_wallet_start_mocks(C, fun() -> throw(#fistful_IdentityNotFound{}) end),
_ = create_wallet_start_mocks(C, fun() -> {throwing, #fistful_IdentityNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such identity">>}}},
create_wallet_call_api(C)
@ -153,7 +153,7 @@ create_fail_identity_notfound(C) ->
-spec create_fail_currency_notfound(config()) -> _.
create_fail_currency_notfound(C) ->
create_wallet_start_mocks(C, fun() -> throw(#fistful_CurrencyNotFound{}) end),
_ = create_wallet_start_mocks(C, fun() -> {throwing, #fistful_CurrencyNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Currency not supported">>}}},
create_wallet_call_api(C)
@ -161,7 +161,7 @@ create_fail_currency_notfound(C) ->
-spec create_fail_party_inaccessible(config()) -> _.
create_fail_party_inaccessible(C) ->
create_wallet_start_mocks(C, fun() -> throw(#fistful_PartyInaccessible{}) end),
_ = create_wallet_start_mocks(C, fun() -> {throwing, #fistful_PartyInaccessible{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Identity inaccessible">>}}},
create_wallet_call_api(C)
@ -170,12 +170,12 @@ create_fail_party_inaccessible(C) ->
-spec get_ok(config()) -> _.
get_ok(C) ->
PartyID = ?config(party, C),
get_wallet_start_mocks(C, fun() -> {ok, ?WALLET(PartyID)} end),
_ = get_wallet_start_mocks(C, fun() -> {ok, ?WALLET(PartyID)} end),
{ok, _} = get_wallet_call_api(C).
-spec get_fail_wallet_notfound(config()) -> _.
get_fail_wallet_notfound(C) ->
get_wallet_start_mocks(C, fun() -> throw(#fistful_WalletNotFound{}) end),
_ = get_wallet_start_mocks(C, fun() -> {throwing, #fistful_WalletNotFound{}} end),
?assertEqual(
{error, {404, #{}}},
get_wallet_call_api(C)
@ -184,7 +184,7 @@ get_fail_wallet_notfound(C) ->
-spec get_by_external_id_ok(config()) -> _.
get_by_external_id_ok(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{bender_thrift, fun('GetInternalID', _) -> {ok, ?GET_INTERNAL_ID_RESULT} end},
{fistful_wallet, fun('Get', _) -> {ok, ?WALLET(PartyID)} end}
@ -204,7 +204,7 @@ get_by_external_id_ok(C) ->
-spec get_account_ok(config()) -> _.
get_account_ok(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_wallet, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
@ -217,10 +217,10 @@ get_account_ok(C) ->
-spec get_account_fail_get_context_wallet_notfound(config()) -> _.
get_account_fail_get_context_wallet_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_wallet, fun
('GetContext', _) -> throw(#fistful_WalletNotFound{});
('GetContext', _) -> {throwing, #fistful_WalletNotFound{}};
('GetAccountBalance', _) -> {ok, ?ACCOUNT_BALANCE}
end}
],
@ -234,11 +234,11 @@ get_account_fail_get_context_wallet_notfound(C) ->
-spec get_account_fail_get_accountbalance_wallet_notfound(config()) -> _.
get_account_fail_get_accountbalance_wallet_notfound(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_wallet, fun
('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)};
('GetAccountBalance', _) -> throw(#fistful_WalletNotFound{})
('GetAccountBalance', _) -> {throwing, #fistful_WalletNotFound{}}
end}
],
C

View File

@ -46,7 +46,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -116,10 +116,10 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
@ -129,7 +129,7 @@ create_webhook_ok_test(C) ->
{ok, Identity} = create_identity(C),
IdentityID = maps:get(<<"id">>, Identity),
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{webhook_manager, fun('Create', _) -> {ok, ?WEBHOOK(?DESTINATION_EVENT_FILTER)} end},
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end},
@ -157,7 +157,7 @@ create_withdrawal_webhook_ok_test(C) ->
{ok, Identity} = create_identity(C),
IdentityID = maps:get(<<"id">>, Identity),
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{webhook_manager, fun('Create', _) -> {ok, ?WEBHOOK(?WITHDRAWAL_EVENT_FILTER)} end},
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end},
@ -187,7 +187,7 @@ get_webhooks_ok_test(C) ->
PartyID = ?config(party, C),
{ok, Identity} = create_identity(C),
IdentityID = maps:get(<<"id">>, Identity),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{webhook_manager, fun('GetList', _) ->
{ok, [?WEBHOOK(?WITHDRAWAL_EVENT_FILTER), ?WEBHOOK(?DESTINATION_EVENT_FILTER)]}
@ -211,7 +211,7 @@ get_webhook_ok_test(C) ->
{ok, Identity} = create_identity(C),
IdentityID = maps:get(<<"id">>, Identity),
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{webhook_manager, fun('Get', _) -> {ok, ?WEBHOOK(?WITHDRAWAL_EVENT_FILTER)} end},
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end}
@ -236,7 +236,7 @@ delete_webhook_ok_test(C) ->
{ok, Identity} = create_identity(C),
IdentityID = maps:get(<<"id">>, Identity),
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{webhook_manager, fun('Delete', _) -> {ok, ok} end},
{fistful_identity, fun('GetContext', _) -> {ok, ?DEFAULT_CONTEXT(PartyID)} end}

View File

@ -66,7 +66,7 @@
init([]) ->
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
-spec all() -> [test_case_name()].
-spec all() -> [{group, test_case_name()}].
all() ->
[
{group, base}
@ -111,7 +111,7 @@ groups() ->
-spec init_per_suite(config()) -> config().
init_per_suite(Config) ->
%% TODO remove this after cut off wapi
ok = application:set_env(wapi, transport, thrift),
_ = application:set_env(wapi, transport, thrift),
ct_helper:makeup_cfg(
[
ct_helper:test_case_name(init),
@ -129,8 +129,8 @@ init_per_suite(Config) ->
-spec end_per_suite(config()) -> _.
end_per_suite(C) ->
%% TODO remove this after cut off wapi
ok = application:unset_env(wapi, transport),
ok = ct_payment_system:shutdown(C).
_ = application:unset_env(wapi, transport),
ct_payment_system:shutdown(C).
-spec init_per_group(group_name(), config()) -> config().
init_per_group(Group, Config) when Group =:= base ->
@ -161,10 +161,10 @@ init_per_testcase(Name, C) ->
ok = ct_helper:set_context(C1),
[{test_sup, wapi_ct_helper:start_mocked_service_sup(?MODULE)} | C1].
-spec end_per_testcase(test_case_name(), config()) -> config().
-spec end_per_testcase(test_case_name(), config()) -> _.
end_per_testcase(_Name, C) ->
ok = ct_helper:unset_context(),
wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
_ = wapi_ct_helper:stop_mocked_service_sup(?config(test_sup, C)),
ok.
%%% Tests
@ -172,12 +172,12 @@ end_per_testcase(_Name, C) ->
-spec create_ok(config()) -> _.
create_ok(C) ->
PartyID = ?config(party, C),
create_withdrawal_start_mocks(C, fun() -> {ok, ?WITHDRAWAL(PartyID)} end),
_ = create_withdrawal_start_mocks(C, fun() -> {ok, ?WITHDRAWAL(PartyID)} end),
{ok, _} = create_withdrawal_call_api(C).
-spec create_fail_wallet_notfound(config()) -> _.
create_fail_wallet_notfound(C) ->
create_withdrawal_start_mocks(C, fun() -> throw(#fistful_WalletNotFound{}) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, #fistful_WalletNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such wallet">>}}},
create_withdrawal_call_api(C)
@ -185,7 +185,7 @@ create_fail_wallet_notfound(C) ->
-spec create_fail_destination_notfound(config()) -> _.
create_fail_destination_notfound(C) ->
create_withdrawal_start_mocks(C, fun() -> throw(#fistful_DestinationNotFound{}) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, #fistful_DestinationNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such destination">>}}},
create_withdrawal_call_api(C)
@ -193,7 +193,7 @@ create_fail_destination_notfound(C) ->
-spec create_fail_destination_unauthorized(config()) -> _.
create_fail_destination_unauthorized(C) ->
create_withdrawal_start_mocks(C, fun() -> throw(#fistful_DestinationUnauthorized{}) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, #fistful_DestinationUnauthorized{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Destination unauthorized">>}}},
create_withdrawal_call_api(C)
@ -207,7 +207,7 @@ create_fail_forbidden_operation_currency(C) ->
#'CurrencyRef'{symbolic_code = ?RUB}
]
},
create_withdrawal_start_mocks(C, fun() -> throw(ForbiddenOperationCurrencyException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, ForbiddenOperationCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Forbidden currency">>}}},
create_withdrawal_call_api(C)
@ -222,7 +222,7 @@ create_fail_forbidden_operation_amount(C) ->
lower = {inclusive, ?CASH}
}
},
create_withdrawal_start_mocks(C, fun() -> throw(ForbiddenOperationAmountException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, ForbiddenOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid cash amount">>}}},
create_withdrawal_call_api(C)
@ -233,7 +233,7 @@ create_fail_invalid_operation_amount(C) ->
InvalidOperationAmountException = #fistful_InvalidOperationAmount{
amount = ?CASH
},
create_withdrawal_start_mocks(C, fun() -> throw(InvalidOperationAmountException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, InvalidOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid cash amount">>}}},
create_withdrawal_call_api(C)
@ -252,7 +252,7 @@ create_fail_inconsistent_withdrawal_currency(C) ->
symbolic_code = ?RUB
}
},
create_withdrawal_start_mocks(C, fun() -> throw(InconsistentWithdrawalCurrencyException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, InconsistentWithdrawalCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid currency">>}}},
create_withdrawal_call_api(C)
@ -260,7 +260,7 @@ create_fail_inconsistent_withdrawal_currency(C) ->
-spec create_fail_no_destination_resource_info(config()) -> _.
create_fail_no_destination_resource_info(C) ->
create_withdrawal_start_mocks(C, fun() -> throw(#wthd_NoDestinationResourceInfo{}) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, #wthd_NoDestinationResourceInfo{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Unknown card issuer">>}}},
create_withdrawal_call_api(C)
@ -272,7 +272,7 @@ create_fail_identity_providers_mismatch(C) ->
wallet_provider = ?INTEGER,
destination_provider = ?INTEGER
},
create_withdrawal_start_mocks(C, fun() -> throw(IdentityProviderMismatchException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, IdentityProviderMismatchException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"This wallet and destination cannot be used together">>}}},
create_withdrawal_call_api(C)
@ -283,7 +283,7 @@ create_fail_wallet_inaccessible(C) ->
WalletInaccessibleException = #fistful_WalletInaccessible{
id = ?STRING
},
create_withdrawal_start_mocks(C, fun() -> throw(WalletInaccessibleException) end),
_ = create_withdrawal_start_mocks(C, fun() -> {throwing, WalletInaccessibleException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Wallet inaccessible">>}}},
create_withdrawal_call_api(C)
@ -292,7 +292,7 @@ create_fail_wallet_inaccessible(C) ->
-spec get_ok(config()) -> _.
get_ok(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_withdrawal, fun('Get', _) -> {ok, ?WITHDRAWAL(PartyID)} end}
],
@ -310,9 +310,9 @@ get_ok(C) ->
-spec get_fail_withdrawal_notfound(config()) -> _.
get_fail_withdrawal_notfound(C) ->
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{fistful_withdrawal, fun('Get', _) -> throw(#fistful_WithdrawalNotFound{}) end}
{fistful_withdrawal, fun('Get', _) -> {throwing, #fistful_WithdrawalNotFound{}} end}
],
C
),
@ -332,7 +332,7 @@ get_fail_withdrawal_notfound(C) ->
-spec get_by_external_id_ok(config()) -> _.
get_by_external_id_ok(C) ->
PartyID = ?config(party, C),
wapi_ct_helper:mock_services(
_ = wapi_ct_helper:mock_services(
[
{bender_thrift, fun('GetInternalID', _) -> {ok, ?GET_INTERNAL_ID_RESULT} end},
{fistful_withdrawal, fun('Get', _) -> {ok, ?WITHDRAWAL(PartyID)} end}
@ -351,12 +351,12 @@ get_by_external_id_ok(C) ->
-spec create_quote_ok(config()) -> _.
create_quote_ok(C) ->
get_quote_start_mocks(C, fun() -> {ok, ?WITHDRAWAL_QUOTE} end),
_ = get_quote_start_mocks(C, fun() -> {ok, ?WITHDRAWAL_QUOTE} end),
{ok, _} = create_qoute_call_api(C).
-spec get_quote_fail_wallet_notfound(config()) -> _.
get_quote_fail_wallet_notfound(C) ->
get_quote_start_mocks(C, fun() -> throw(#fistful_WalletNotFound{}) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, #fistful_WalletNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such wallet">>}}},
create_qoute_call_api(C)
@ -364,7 +364,7 @@ get_quote_fail_wallet_notfound(C) ->
-spec get_quote_fail_destination_notfound(config()) -> _.
get_quote_fail_destination_notfound(C) ->
get_quote_start_mocks(C, fun() -> throw(#fistful_DestinationNotFound{}) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, #fistful_DestinationNotFound{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"No such destination">>}}},
create_qoute_call_api(C)
@ -372,7 +372,7 @@ get_quote_fail_destination_notfound(C) ->
-spec get_quote_fail_destination_unauthorized(config()) -> _.
get_quote_fail_destination_unauthorized(C) ->
get_quote_start_mocks(C, fun() -> throw(#fistful_DestinationUnauthorized{}) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, #fistful_DestinationUnauthorized{}} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Destination unauthorized">>}}},
create_qoute_call_api(C)
@ -386,7 +386,7 @@ get_quote_fail_forbidden_operation_currency(C) ->
#'CurrencyRef'{symbolic_code = ?RUB}
]
},
get_quote_start_mocks(C, fun() -> throw(ForbiddenOperationCurrencyException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, ForbiddenOperationCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Forbidden currency">>}}},
create_qoute_call_api(C)
@ -401,7 +401,7 @@ get_quote_fail_forbidden_operation_amount(C) ->
lower = {inclusive, ?CASH}
}
},
get_quote_start_mocks(C, fun() -> throw(ForbiddenOperationAmountException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, ForbiddenOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid cash amount">>}}},
create_qoute_call_api(C)
@ -412,7 +412,7 @@ get_quote_fail_invalid_operation_amount(C) ->
InvalidOperationAmountException = #fistful_InvalidOperationAmount{
amount = ?CASH
},
get_quote_start_mocks(C, fun() -> throw(InvalidOperationAmountException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, InvalidOperationAmountException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid cash amount">>}}},
create_qoute_call_api(C)
@ -431,7 +431,7 @@ get_quote_fail_inconsistent_withdrawal_currency(C) ->
symbolic_code = ?RUB
}
},
get_quote_start_mocks(C, fun() -> throw(InconsistentWithdrawalCurrencyException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, InconsistentWithdrawalCurrencyException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"Invalid currency">>}}},
create_qoute_call_api(C)
@ -443,7 +443,7 @@ get_quote_fail_identity_provider_mismatch(C) ->
wallet_provider = ?INTEGER,
destination_provider = ?INTEGER
},
get_quote_start_mocks(C, fun() -> throw(IdentityProviderMismatchException) end),
_ = get_quote_start_mocks(C, fun() -> {throwing, IdentityProviderMismatchException} end),
?assertEqual(
{error, {422, #{<<"message">> => <<"This wallet and destination cannot be used together">>}}},
create_qoute_call_api(C)
@ -451,7 +451,7 @@ get_quote_fail_identity_provider_mismatch(C) ->
-spec get_event_ok(config()) -> _.
get_event_ok(C) ->
get_events_start_mocks(C, fun() -> {ok, []} end),
_ = get_events_start_mocks(C, fun() -> {ok, []} end),
{ok, _} = call_api(
fun swag_client_wallet_withdrawals_api:get_withdrawal_events/3,
#{
@ -465,7 +465,7 @@ get_event_ok(C) ->
-spec get_events_ok(config()) -> _.
get_events_ok(C) ->
get_events_start_mocks(C, fun() -> {ok, []} end),
_ = get_events_start_mocks(C, fun() -> {ok, []} end),
{ok, _} = call_api(
fun swag_client_wallet_withdrawals_api:poll_withdrawal_events/3,
#{
@ -481,7 +481,7 @@ get_events_ok(C) ->
-spec get_events_fail_withdrawal_notfound(config()) -> _.
get_events_fail_withdrawal_notfound(C) ->
get_events_start_mocks(C, fun() -> throw(#fistful_WithdrawalNotFound{}) end),
_ = get_events_start_mocks(C, fun() -> {throwing, #fistful_WithdrawalNotFound{}} end),
?assertEqual(
{error, {404, #{}}},
call_api(

View File

@ -32,7 +32,7 @@ services:
condition: service_healthy
wapi-pcidss:
image: dr2.rbkmoney.com/rbkmoney/wapi:9ae84a966a29937ed3440fe773ef8bf6c280301c
image: dr2.rbkmoney.com/rbkmoney/wapi:9ad9bc94d13ad04a594963a64701226b51560f5b
command: /opt/wapi/bin/wapi foreground
volumes:
- ./test/wapi/sys.config:/opt/wapi/releases/0.0.1/sys.config
@ -52,7 +52,7 @@ services:
retries: 10
hellgate:
image: dr2.rbkmoney.com/rbkmoney/hellgate:983ba4d48b47cd5216f75cb3e30ab14f1dd99f46
image: dr2.rbkmoney.com/rbkmoney/hellgate:32e269ab4f9f51b87dcb5a14a478b829a9c15737
command: /opt/hellgate/bin/hellgate foreground
depends_on:
machinegun:
@ -96,7 +96,7 @@ services:
retries: 20
dominant:
image: dr2.rbkmoney.com/rbkmoney/dominant:1313973ee38e30116d14aa007cdf551f702900f5
image: dr2.rbkmoney.com/rbkmoney/dominant:0ee5a2b878152145412f4a3562ea552d4113a836
command: /opt/dominant/bin/dominant foreground
depends_on:
machinegun:
@ -111,7 +111,7 @@ services:
retries: 10
shumway:
image: dr2.rbkmoney.com/rbkmoney/shumway:658c9aec229b5a70d745a49cb938bb1a132b5ca2
image: dr2.rbkmoney.com/rbkmoney/shumway:e946e83703e02f4359cd536b15fb94457f9bfb20
restart: unless-stopped
entrypoint:
- java
@ -176,13 +176,13 @@ services:
retries: 20
holmes:
image: dr2.rbkmoney.com/rbkmoney/holmes:55e745b7c020c367bff202036af84726d66755f7
image: dr2.rbkmoney.com/rbkmoney/holmes:07f58e297c03bcd50dc4695ddbcfa4eb30c9928e
command: /opt/holmes/scripts/cds/keyring.py init
depends_on:
- cds
machinegun:
image: dr2.rbkmoney.com/rbkmoney/machinegun:c35e8a08500fbc2f0f0fa376a145a7324d18a062
image: dr2.rbkmoney.com/rbkmoney/machinegun:0da2ffc23221e1e3f8557b03d48d11d2dd18fac0
command: /opt/machinegun/bin/machinegun foreground
volumes:
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml

View File

@ -2,46 +2,55 @@
{elvis, [
{config, [
#{
dirs => ["apps/*/src"],
dirs => ["apps/*/**"],
filter => "*.erl",
ignore => ["_thrift.erl$", "src/swag_server*", "src/swag_client*"],
ignore => ["apps/swag_*"],
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_text_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_text_style, no_tabs},
{elvis_text_style, no_trailing_whitespace},
{elvis_style, macro_module_names},
{elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}},
{elvis_style, nesting_level, #{level => 3}},
{elvis_style, god_modules, #{limit => 35, ignore => [wapi_wallet_ff_backend]}},
{elvis_style, god_modules, #{
limit => 30,
ignore => [
wapi_wallet_ff_backend,
wapi_p2p_transfer_tests_SUITE,
wapi_withdrawal_tests_SUITE
]
}},
{elvis_style, no_if_expression},
{elvis_style, invalid_dynamic_call, #{ignore => [wapi_swagger_server, wapi_stream_h]}},
{elvis_style, invalid_dynamic_call, #{
ignore => [
ff_ct_provider_handler
]
}},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{elvis_style, module_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*(_SUITE)?$"}},
{elvis_style, function_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*$"}},
{elvis_style, state_record_and_type},
{elvis_style, module_naming_convention, #{regex => "^[a-z]([a-z0-9]*_?)*(_SUITE)?$"}},
{elvis_style, function_naming_convention, #{regex => "^[a-z]([a-z0-9]*_?)*$"}},
{elvis_style, state_record_and_type, #{
ignore => [
machinery_gensrv_backend
]
}},
{elvis_style, no_spec_with_records},
{elvis_style, dont_repeat_yourself, #{min_complexity => 15}},
{elvis_style, no_debug_call, #{ignore => [elvis, elvis_utils]}}
]
},
#{
dirs => ["apps/*/test"],
filter => "*.erl",
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_style, macro_module_names},
{elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}},
{elvis_style, nesting_level, #{level => 3}},
{elvis_style, no_if_expression},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{elvis_style, module_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*(_SUITE)?$"}},
{elvis_style, function_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*$"}},
{elvis_style, no_spec_with_records},
{elvis_style, dont_repeat_yourself, #{min_complexity => 30}}
{elvis_style, dont_repeat_yourself, #{
min_complexity => 32,
ignore => [
ff_source_machinery_schema,
ff_deposit_machinery_schema,
ff_destination_machinery_schema,
ff_identity_machinery_schema,
ff_p2p_session_machinery_schema,
ff_p2p_transfer_machinery_schema,
ff_wallet_machinery_schema,
ff_withdrawal_machinery_schema,
ff_withdrawal_session_machinery_schema
]
}},
{elvis_style, no_debug_call, #{}}
]
},
#{
@ -55,32 +64,23 @@
ruleset => elvis_config
},
#{
dirs => ["apps", "apps/*"],
ignore => ["swag_server*", "swag_client*"],
dirs => [".", "apps/*/*"],
filter => "rebar.config",
ignore => ["apps/swag_*"],
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace}
{elvis_text_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_text_style, no_tabs},
{elvis_text_style, no_trailing_whitespace}
]
},
#{
dirs => ["."],
filter => "rebar.config",
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace}
]
},
#{
dirs => ["apps/*/src"],
dirs => ["apps/**"],
filter => "*.app.src",
ignore => ["src/swag_server*", "src/swag_client*"],
ignore => ["apps/swag_*"],
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace}
{elvis_text_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_text_style, no_tabs},
{elvis_text_style, no_trailing_whitespace}
]
}
]}

View File

@ -26,41 +26,39 @@
% Common project dependencies.
{deps, [
{gproc, "0.8.0"},
{hackney, "1.15.1"},
{cowboy, "2.7.0"},
{jose, "1.11.1"},
{jsx, "3.0.0"},
{prometheus, "4.6.0"},
{prometheus_cowboy, "0.1.8"},
{genlib, {git, "https://github.com/rbkmoney/genlib.git", {branch, "master"}}},
{cowboy_draining_server, {git, "git@github.com:rbkmoney/cowboy_draining_server.git", {branch, "master"}}},
{cowboy_draining_server, {git, "https://github.com/rbkmoney/cowboy_draining_server.git", {branch, "master"}}},
{uuid, {git, "https://github.com/okeuday/uuid.git", {branch, "master"}}},
{scoper, {git, "git@github.com:rbkmoney/scoper.git", {branch, "master"}}},
{scoper, {git, "https://github.com/rbkmoney/scoper.git", {branch, "master"}}},
{thrift, {git, "https://github.com/rbkmoney/thrift_erlang.git", {branch, "master"}}},
{woody, {git, "https://github.com/rbkmoney/woody_erlang.git", {branch, "master"}}},
{woody_user_identity, {git, "https://github.com/rbkmoney/woody_erlang_user_identity.git", {branch, "master"}}},
{erl_health, {git, "https://github.com/rbkmoney/erlang-health.git", {branch, "master"}}},
{machinery, {git, "git@github.com:rbkmoney/machinery.git", {branch, "master"}}},
{gproc, "0.8.0"},
{hackney, "1.15.1"},
{cowboy, "2.7.0"},
{jose, "1.10.1"},
{base64url, "0.0.1"},
{jsx, "2.9.0"},
{prometheus, "4.6.0"},
{prometheus_cowboy, "0.1.8"},
{cds_proto, {git, "git@github.com:rbkmoney/cds-proto.git", {branch, "master"}}},
{damsel, {git, "git@github.com:rbkmoney/damsel.git", {branch, "release/erlang/master"}}},
{machinery, {git, "https://github.com/rbkmoney/machinery.git", {branch, "master"}}},
{cds_proto, {git, "https://github.com/rbkmoney/cds-proto.git", {branch, "master"}}},
{damsel, {git, "https://github.com/rbkmoney/damsel.git", {branch, "release/erlang/master"}}},
{dmt_client, {git, "https://github.com/rbkmoney/dmt_client.git", {branch, master}}},
{id_proto, {git, "git@github.com:rbkmoney/identification-proto.git", {branch, "master"}}},
{identdocstore_proto, {git, "git@github.com:rbkmoney/identdocstore-proto.git", {branch, "master"}}},
{fistful_proto, {git, "git@github.com:rbkmoney/fistful-proto.git", {branch, "master"}}},
{fistful_reporter_proto, {git, "git@github.com:rbkmoney/fistful-reporter-proto.git", {branch, "master"}}},
{file_storage_proto, {git, "git@github.com:rbkmoney/file-storage-proto.git", {branch, "master"}}},
{shumpune_proto, {git, "git@github.com:rbkmoney/shumpune-proto.git", {branch, "master"}}},
{binbase_proto, {git, "git@github.com:rbkmoney/binbase-proto.git", {branch, "master"}}},
{party_client, {git, "git@github.com:rbkmoney/party_client_erlang.git", {branch, "master"}}},
{uac, {git, "https://github.com/rbkmoney/erlang_uac.git", {branch, master}}},
{bender_client, {git, "git@github.com:rbkmoney/bender_client_erlang.git", {branch, "master"}}},
{lechiffre, {git, "git@github.com:rbkmoney/lechiffre.git", {branch, "master"}}},
{id_proto, {git, "https://github.com/rbkmoney/identification-proto.git", {branch, "master"}}},
{identdocstore_proto, {git, "https://github.com/rbkmoney/identdocstore-proto.git", {branch, "master"}}},
{fistful_proto, {git, "https://github.com/rbkmoney/fistful-proto.git", {branch, "master"}}},
{fistful_reporter_proto, {git, "https://github.com/rbkmoney/fistful-reporter-proto.git", {branch, "master"}}},
{file_storage_proto, {git, "https://github.com/rbkmoney/file-storage-proto.git", {branch, "master"}}},
{binbase_proto, {git, "https://github.com/rbkmoney/binbase-proto.git", {branch, "master"}}},
{party_client, {git, "https://github.com/rbkmoney/party_client_erlang.git", {branch, "master"}}},
{bender_client, {git, "https://github.com/rbkmoney/bender_client_erlang.git", {branch, "master"}}},
{bender_proto, {git, "https://github.com/rbkmoney/bender-proto.git", {branch, "master"}}},
{lechiffre, {git, "https://github.com/rbkmoney/lechiffre.git", {branch, "master"}}},
{cowboy_cors, {git, "https://github.com/rbkmoney/cowboy_cors.git", {branch, master}}},
{cowboy_access_log, {git, "git@github.com:rbkmoney/cowboy_access_log.git", {branch, "master"}}},
{payproc_errors, {git, "git@github.com:rbkmoney/payproc-errors-erlang.git", {branch, "master"}}},
{logger_logstash_formatter, {git, "git@github.com:rbkmoney/logger_logstash_formatter.git", {branch, "master"}}}
{cowboy_access_log, {git, "https://github.com/rbkmoney/cowboy_access_log.git", {branch, "master"}}},
{uac, {git, "https://github.com/rbkmoney/erlang_uac.git", {ref, "02ab22a"}}},
{shumpune_proto, {git, "https://github.com/rbkmoney/shumpune-proto.git", {ref, "4c87f03"}}}
]}.
{xref_checks, [
@ -85,7 +83,9 @@
{prod, [
{deps, [
% Introspect a node running in production
{recon, "2.3.4"}
{recon, "2.3.4"},
{logger_logstash_formatter,
{git, "https://github.com/rbkmoney/logger_logstash_formatter.git", {ref, "87e52c7"}}}
]},
{relx, [
{release, {'fistful-server', "0.1"}, [
@ -119,12 +119,13 @@
swag_client_payres,
swag_client_wallet,
swag_server_wallet
]}
]},
{dialyzer, [{plt_extra_apps, [eunit, common_test, meck]}]}
]}
]}.
{plugins, [
{erlfmt, "0.8.0"}
{erlfmt, "0.10.0"}
]}.
{erlfmt, [
@ -135,6 +136,8 @@
"apps/machinery_extra/{src,include,test}/*.{hrl,erl}",
"apps/p2p/{src,include,test}/*.{hrl,erl}",
"apps/w2w/{src,include,test}/*.{hrl,erl}",
"apps/wapi*/{src,include,test}/*.{hrl,erl}"
"apps/wapi*/{src,include,test}/*.{hrl,erl}",
"rebar.config",
"elvis.config"
]}
]}.

View File

@ -1,22 +1,21 @@
{"1.2.0",
[{<<"accept">>,{pkg,<<"accept">>,<<"0.3.5">>},2},
{<<"base64url">>,{pkg,<<"base64url">>,<<"0.0.1">>},0},
{<<"bear">>,{pkg,<<"bear">>,<<"0.8.7">>},3},
{<<"bender_client">>,
{git,"git@github.com:rbkmoney/bender_client_erlang.git",
{ref,"3c1489a397dacd1e613b777834ab511023afad36"}},
{git,"https://github.com/rbkmoney/bender_client_erlang.git",
{ref,"69024efc38167c515d1dc7b7c2bb52262ffe7d0d"}},
0},
{<<"bender_proto">>,
{git,"git@github.com:rbkmoney/bender-proto.git",
{ref,"0d5813b8a25c8d03e4e59e42aa5f4e9b785a3849"}},
{git,"https://github.com/rbkmoney/bender-proto.git",
{ref,"dfe271b09a2b8e457f50e4732b905a0b846bf529"}},
0},
{<<"binbase_proto">>,
{git,"git@github.com:rbkmoney/binbase-proto.git",
{ref,"1123f8019d81291b624bf4eee0ffcb91969a1caa"}},
{git,"https://github.com/rbkmoney/binbase-proto.git",
{ref,"410b2c241d199e3cd42a9b8b553e8aa645d6ff19"}},
0},
{<<"cache">>,{pkg,<<"cache">>,<<"2.2.0">>},1},
{<<"cache">>,{pkg,<<"cache">>,<<"2.3.3">>},1},
{<<"cds_proto">>,
{git,"git@github.com:rbkmoney/cds-proto.git",
{git,"https://github.com/rbkmoney/cds-proto.git",
{ref,"07f2b0f2e61d94b5fd93c40106525a9777d3398e"}},
0},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.5.1">>},1},
@ -26,7 +25,7 @@
1},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.7.0">>},0},
{<<"cowboy_access_log">>,
{git,"git@github.com:rbkmoney/cowboy_access_log.git",
{git,"https://github.com/rbkmoney/cowboy_access_log.git",
{ref,"c058ad42cd11c6503feb398fb8587c2f72155a60"}},
0},
{<<"cowboy_cors">>,
@ -34,12 +33,12 @@
{ref,"5a3b084fb8c5a4ff58e3c915a822d709d6023c3b"}},
0},
{<<"cowboy_draining_server">>,
{git,"git@github.com:rbkmoney/cowboy_draining_server.git",
{git,"https://github.com/rbkmoney/cowboy_draining_server.git",
{ref,"186cf4d0722d4ad79afe73d371df6b1371e51905"}},
0},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.8.0">>},1},
{<<"damsel">>,
{git,"git@github.com:rbkmoney/damsel.git",
{git,"https://github.com/rbkmoney/damsel.git",
{ref,"e019402c4b8ad4bdd0eceea7ff301357a1ff315a"}},
0},
{<<"dmt_client">>,
@ -50,29 +49,22 @@
{git,"https://github.com/rbkmoney/dmt_core.git",
{ref,"5a0ff399dee3fd606bb864dd0e27ddde539345e2"}},
1},
{<<"email_validator">>,
{git,"https://github.com/rbkmoney/email_validator.git",
{ref,"8817fcd449ee989f7ce256b29fd06935af1472dc"}},
0},
{<<"email_validator">>,{pkg,<<"email_validator">>,<<"1.0.0">>},0},
{<<"erl_health">>,
{git,"https://github.com/rbkmoney/erlang-health.git",
{ref,"982af88738ca062eea451436d830eef8c1fbe3f9"}},
0},
{<<"erlang_localtime">>,
{git,"https://github.com/kpy3/erlang_localtime",
{ref,"c79fa7dd454343e7cbbdcce0c7a95ad86af1485d"}},
0},
{<<"file_storage_proto">>,
{git,"git@github.com:rbkmoney/file-storage-proto.git",
{ref,"281e1ca4cea9bf32229a6c389f0dcf5d49c05a0b"}},
{git,"https://github.com/rbkmoney/file-storage-proto.git",
{ref,"d1055d3e09463d4c959042b38931c113326c88f2"}},
0},
{<<"fistful_proto">>,
{git,"git@github.com:rbkmoney/fistful-proto.git",
{git,"https://github.com/rbkmoney/fistful-proto.git",
{ref,"751bbf864ce1ae76250724b10153cfb8c5276a95"}},
0},
{<<"fistful_reporter_proto">>,
{git,"git@github.com:rbkmoney/fistful-reporter-proto.git",
{ref,"8bec5e6c08c8b43ba606a62fa65d164b07d3de96"}},
{git,"https://github.com/rbkmoney/fistful-reporter-proto.git",
{ref,"3a2155ca864e81979af6eb3211a465eb1e59aa46"}},
0},
{<<"folsom">>,
{git,"https://github.com/folsom-project/folsom.git",
@ -93,39 +85,27 @@
{ref,"8f11d17eeb6eb74096da7363a9df272fd3099718"}},
1},
{<<"id_proto">>,
{git,"git@github.com:rbkmoney/identification-proto.git",
{ref,"1ccb06388c9d717e942046facaf32c0c816d6f69"}},
{git,"https://github.com/rbkmoney/identification-proto.git",
{ref,"0b031c14b02cb304b308c09d0de9b286aae3a2ac"}},
0},
{<<"identdocstore_proto">>,
{git,"git@github.com:rbkmoney/identdocstore-proto.git",
{git,"https://github.com/rbkmoney/identdocstore-proto.git",
{ref,"89a4cda0c7bc45528c6df54b76a97fb0fd82754f"}},
0},
{<<"idna">>,{pkg,<<"idna">>,<<"6.0.0">>},1},
{<<"jesse">>,
{git,"https://github.com/rbkmoney/jesse.git",
{ref,"a21da0609e446f328c01b1a72191cda26a8969a4"}},
{ref,"9b980b7f9ce09b6a136fe5a23d404d1b903f3061"}},
0},
{<<"jiffy">>,
{git,"git@github.com:davisp/jiffy.git",
{ref,"ba09da790477b0f7a31aeaa9b21cae0ffba27d77"}},
0},
{<<"jose">>,{pkg,<<"jose">>,<<"1.10.1">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.8.2">>},0},
{<<"jose">>,{pkg,<<"jose">>,<<"1.11.1">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.0.0">>},0},
{<<"lechiffre">>,
{git,"git@github.com:rbkmoney/lechiffre.git",
{ref,"ff9b70dcf8bdde700ba01429bf91ad36cdd6022b"}},
0},
{<<"libdecaf">>,
{git,"https://github.com/ndiezel0/erlang-libdecaf.git",
{ref,"2e9175794945c1e19495cc7f52d823380d81cdb4"}},
0},
{<<"logger_logstash_formatter">>,
{git,"git@github.com:rbkmoney/logger_logstash_formatter.git",
{ref,"87e52c755cf9e64d651e3ddddbfcd2ccd1db79db"}},
{git,"https://github.com/rbkmoney/lechiffre.git",
{ref,"a9ea635b9db03ec58e7cb2f015f124aa9edf0c4b"}},
0},
{<<"machinery">>,
{git,"git@github.com:rbkmoney/machinery.git",
{ref,"05a77b22c658c5c90d336d3e8c086380040a2ea3"}},
{git,"https://github.com/rbkmoney/machinery.git",
{ref,"db7c94b9913451e9558afa19f2fe77bf48d391da"}},
0},
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},1},
{<<"mg_proto">>,
@ -134,20 +114,13 @@
1},
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},1},
{<<"msgpack_proto">>,
{git,"git@github.com:rbkmoney/msgpack-proto.git",
{ref,"946343842ee740a19701df087edd1f1641eff769"}},
{git,"https://github.com/rbkmoney/msgpack-proto.git",
{ref,"ec15d5e854ea60c58467373077d90c2faf6273d8"}},
1},
{<<"parse_trans">>,
{git,"https://github.com/uwiger/parse_trans.git",
{ref,"76abb347c3c1d00fb0ccf9e4b43e22b3d2288484"}},
0},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},0},
{<<"party_client">>,
{git,"git@github.com:rbkmoney/party_client_erlang.git",
{ref,"d05c5f7b7797f914070b4e8b15870d915764eab0"}},
0},
{<<"payproc_errors">>,
{git,"git@github.com:rbkmoney/payproc-errors-erlang.git",
{ref,"9c16b1fc683f01a14fc50440365662dbc2036d38"}},
{git,"https://github.com/rbkmoney/party_client_erlang.git",
{ref,"255c54a72eb35183d4252de006f1eaee81c4f42c"}},
0},
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.6.0">>},0},
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},
@ -158,16 +131,16 @@
1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},1},
{<<"scoper">>,
{git,"git@github.com:rbkmoney/scoper.git",
{git,"https://github.com/rbkmoney/scoper.git",
{ref,"89a973bf3cedc5a48c9fd89d719d25e79fe10027"}},
0},
{<<"shumpune_proto">>,
{git,"git@github.com:rbkmoney/shumpune-proto.git",
{git,"https://github.com/rbkmoney/shumpune-proto.git",
{ref,"4c87f03591cae3dad41504eb463d962af536b1ab"}},
0},
{<<"snowflake">>,
{git,"https://github.com/rbkmoney/snowflake.git",
{ref,"7f379ad5e389e1c96389a8d60bae8117965d6a6d"}},
{ref,"de159486ef40cec67074afe71882bdc7f7deab72"}},
1},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.4">>},1},
{<<"thrift">>,
@ -176,7 +149,7 @@
0},
{<<"uac">>,
{git,"https://github.com/rbkmoney/erlang_uac.git",
{ref,"83bc982c8e6d27b05c358f74ce1aa68d3616ff38"}},
{ref,"02ab22aa336844be1a242391ac4f968e680217a4"}},
0},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.4.1">>},2},
{<<"uuid">>,
@ -185,7 +158,7 @@
0},
{<<"woody">>,
{git,"https://github.com/rbkmoney/woody_erlang.git",
{ref,"58f56b462429ab1fee65e1bdb34b73512406ba00"}},
{ref,"f2cd30883d58eb1c3ab2172556956f757bc27e23"}},
0},
{<<"woody_user_identity">>,
{git,"https://github.com/rbkmoney/woody_erlang_user_identity.git",
@ -194,19 +167,20 @@
[
{pkg_hash,[
{<<"accept">>, <<"B33B127ABCA7CC948BBE6CAA4C263369ABF1347CFA9D8E699C6D214660F10CD1">>},
{<<"base64url">>, <<"36A90125F5948E3AFD7BE97662A1504B934DD5DAC78451CA6E9ABF85A10286BE">>},
{<<"bear">>, <<"16264309AE5D005D03718A5C82641FCC259C9E8F09ADEB6FD79CA4271168656F">>},
{<<"cache">>, <<"3C11DBF4CD8FCD5787C95A5FB2A04038E3729CFCA0386016EEA8C953AB48A5AB">>},
{<<"cache">>, <<"B23A5FE7095445A88412A6E614C933377E0137B44FFED77C9B3FEF1A731A20B2">>},
{<<"certifi">>, <<"867CE347F7C7D78563450A18A6A28A8090331E77FA02380B4A21962A65D36EE5">>},
{<<"cowboy">>, <<"91ED100138A764355F43316B1D23D7FF6BDB0DE4EA618CB5D8677C93A7A2F115">>},
{<<"cowlib">>, <<"FD0FF1787DB84AC415B8211573E9A30A3EBE71B5CBFF7F720089972B2319C8A4">>},
{<<"email_validator">>, <<"3F942B6AF1A309165B9399C71D5251EF5933774CEBC59EEAF18A7D9C4A8FA092">>},
{<<"gproc">>, <<"CEA02C578589C61E5341FCE149EA36CCEF236CC2ECAC8691FBA408E7EA77EC2F">>},
{<<"hackney">>, <<"9F8F471C844B8CE395F7B6D8398139E26DDCA9EBC171A8B91342EE15A19963F4">>},
{<<"idna">>, <<"689C46CBCDF3524C44D5F3DDE8001F364CD7608A99556D8FBD8239A5798D4C10">>},
{<<"jose">>, <<"16D8E460DAE7203C6D1EFA3F277E25B5AF8B659FEBFC2F2EB4BACF87F128B80A">>},
{<<"jsx">>, <<"7ACC7D785B5ABE8A6E9ADBDE926A24E481F29956DD8B4DF49E3E4E7BCC92A018">>},
{<<"jose">>, <<"59DA64010C69AAD6CDE2F5B9248B896B84472E99BD18F246085B7B9FE435DCDB">>},
{<<"jsx">>, <<"20A170ABD4335FC6DB24D5FAD1E5D677C55DADF83D1B20A8A33B5FE159892A39">>},
{<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>},
{<<"mimerl">>, <<"67E2D3F571088D5CFD3E550C383094B47159F3EEE8FFA08E64106CDF5E981BE3">>},
{<<"parse_trans">>, <<"16328AB840CC09919BD10DAB29E431DA3AF9E9E7E7E6F0089DD5A2D2820011D8">>},
{<<"prometheus">>, <<"20510F381DB1CCAB818B4CF2FAC5FA6AB5CC91BC364A154399901C001465F46F">>},
{<<"prometheus_cowboy">>, <<"CFCE0BC7B668C5096639084FCD873826E6220EA714BF60A716F5BD080EF2A99C">>},
{<<"prometheus_httpd">>, <<"F616ED9B85B536B195D94104063025A91F904A4CFC20255363F49A197D96C896">>},
@ -215,19 +189,20 @@
{<<"unicode_util_compat">>, <<"D869E4C68901DD9531385BB0C8C40444EBF624E60B6962D95952775CAC5E90CD">>}]},
{pkg_hash_ext,[
{<<"accept">>, <<"11B18C220BCC2EAB63B5470C038EF10EB6783BCB1FCDB11AA4137DEFA5AC1BB8">>},
{<<"base64url">>, <<"FAB09B20E3F5DB886725544CBCF875B8E73EC93363954EB8A1A9ED834AA8C1F9">>},
{<<"bear">>, <<"534217DCE6A719D59E54FB0EB7A367900DBFC5F85757E8C1F94269DF383F6D9B">>},
{<<"cache">>, <<"3E7D6706DE5DF76C4D71C895B4BE62B01C3DE6EDB63197035E465C3BCE63F19B">>},
{<<"cache">>, <<"44516CE6FA03594D3A2AF025DD3A87BFE711000EB730219E1DDEFC816E0AA2F4">>},
{<<"certifi">>, <<"805ABD97539CAF89EC6D4732C91E62BA9DA0CDA51AC462380BBD28EE697A8C42">>},
{<<"cowboy">>, <<"04FD8C6A39EDC6AAA9C26123009200FC61F92A3A94F3178C527B70B767C6E605">>},
{<<"cowlib">>, <<"79F954A7021B302186A950A32869DBC185523D99D3E44CE430CD1F3289F41ED4">>},
{<<"email_validator">>, <<"44CBDB6E9615FE3D558715E4E6D60610E934CD3FE4B8C650FEC5C560304526D6">>},
{<<"gproc">>, <<"580ADAFA56463B75263EF5A5DF4C86AF321F68694E7786CB057FD805D1E2A7DE">>},
{<<"hackney">>, <<"C2790C9F0F7205F4A362512192DEE8179097394400E745E4D20BAB7226A8EAAD">>},
{<<"idna">>, <<"4BDD305EB64E18B0273864920695CB18D7A2021F31A11B9C5FBCD9A253F936E2">>},
{<<"jose">>, <<"3C7DDC8A9394B92891DB7C2771DA94BF819834A1A4C92E30857B7D582E2F8257">>},
{<<"jsx">>, <<"B4C5D3230B397C8D95579E4A3D72826BB6463160130CCF4182F5BE8579B5F44C">>},
{<<"jose">>, <<"078F6C9FB3CD2F4CFAFC972C814261A7D1E8D2B3685C0A76EB87E158EFFF1AC5">>},
{<<"jsx">>, <<"37BECA0435F5CA8A2F45F76A46211E76418FBEF80C36F0361C249FC75059DC6D">>},
{<<"metrics">>, <<"69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16">>},
{<<"mimerl">>, <<"F278585650AA581986264638EBF698F8BB19DF297F66AD91B18910DFC6E19323">>},
{<<"parse_trans">>, <<"07CD9577885F56362D414E8C4C4E6BDF10D43A8767ABB92D24CBE8B24C54888B">>},
{<<"prometheus">>, <<"4905FD2992F8038ECCD7AA0CD22F40637ED618C0BED1F75C05AACEC15B7545DE">>},
{<<"prometheus_cowboy">>, <<"BA286BECA9302618418892D37BCD5DC669A6CC001F4EB6D6AF85FF81F3F4F34C">>},
{<<"prometheus_httpd">>, <<"0BBE831452CFDF9588538EB2F570B26F30C348ADAE5E95A7D87F35A5910BCF92">>},