-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] #52
[WIP] #52
Conversation
Json = [build_field(F, Definitions) || F <- RequiredFields], | ||
|
||
io:format("Json: ~p~n", [Json]), | ||
R = api_call(Post, Path, [{<<"Content-Type">>, ContentType}], maps:from_list(Json)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 31 is too long: R = api_call(Post, Path, [{<<"Content-Type">>, ContentType}], maps:from_list(Json)),.
|
||
-exports([init_per_suite/1]). | ||
|
||
init_per_suite(Config) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: function init_per_suite/1 is unused
-module(sr_test_SUITE). | ||
|
||
-spec method_not_allowed(any()) -> ok. | ||
method_not_allowed(Config) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: function method_not_allowed/1 is unused
api_call(Method, Path) -> | ||
api_call(Method, Path, []). | ||
|
||
api_call(Method, Path, Hdrs) when is_list(Hdrs) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: missing specification for function api_call/3
advanced_tests(Handlers) -> | ||
ok. | ||
|
||
api_call(Method, Path) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: missing specification for function api_call/2
ok. | ||
|
||
-spec advanced_tests([module()]) -> ok. | ||
advanced_tests(Handlers) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: variable 'Handlers' is unused
api_call(Method, Path, Hdrs) when is_list(Hdrs) -> | ||
api_call(Method, Path, Hdrs, <<>>). | ||
|
||
api_call(Method, Path, Hdrs, Json) when is_map(Json) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Compiler:
Warning: missing specification for function api_call/4
|
||
-mixin([{sr_test_SUITE, [method_not_allowed/1]}]). | ||
|
||
-exports([init_per_suite/1]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's export
api_call(Method, Path, Hdrs, jsx:encode(Json)); | ||
api_call(Method, Path, Headers, Body) -> | ||
{ok, Application} = application:get_application(), | ||
Port = integer_to_binary(application:get_env(Application, http_port, 8080)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request the port as a parameter (or the whole server name, maybe). Not all apps keep the port in the same place.
ct:fail("Couldnt ~p ~p: ~p", [Method, Path, X]) | ||
end. | ||
|
||
%% @todo remove once inaka/sumo_rest#44 is fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fixed already. Check #44
Json = [build_field(F, Definitions) || F <- RequiredFields], | ||
|
||
io:format("Json: ~p~n", [Json]), | ||
R = api_call(Post, Path, [{<<"Content-Type">>, ContentType}], maps:from_list(Json)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 31 is too long: R = api_call(Post, Path, [{<<"Content-Type">>, ContentType}], maps:from_list(Json)),.
No description provided.