Permalink
Browse files

Remove an unnecessary function

  • Loading branch information...
1 parent a7ab0a2 commit a927aca9193b4eb8faebb1050003f297169218fa @yosukehara yosukehara committed Apr 4, 2013
Showing with 3 additions and 13 deletions.
  1. +1 −11 src/leo_gateway_http_commons.erl
  2. +2 −2 test/leo_gateway_web_tests.erl
@@ -33,7 +33,7 @@
-include_lib("leo_object_storage/include/leo_object_storage.hrl").
-include_lib("eunit/include/eunit.hrl").
--export([start/1, start/2, stop/0]).
+-export([start/1, start/2]).
-export([onrequest/2, onresponse/2]).
-export([get_object/3, get_object_with_cache/4,
put_object/3, put_small_object/3, put_large_object/4,
@@ -114,16 +114,6 @@ start(Sup, Options) ->
start(Options).
-%% @doc Stop proc(s)
-%%
--spec(stop() ->
- ok).
-stop() ->
- {ok, HttpOption} = leo_gateway_app:get_options(),
- Handler = HttpOption#http_options.handler,
- Handler:stop().
-
-
%% @doc Handle request
%%
-spec(onrequest(#cache_condition{}, function()) ->
@@ -175,7 +175,7 @@ setup_s3_api() ->
{ok, Options} = leo_gateway_app:get_options(),
InitFun = fun() -> leo_gateway_http_commons:start(Options) end,
- TermFun = fun() -> leo_gateway_http_commons:stop() end,
+ TermFun = fun() -> leo_gateway_s3_api:stop() end,
setup(InitFun, TermFun).
setup_rest_api() ->
@@ -187,7 +187,7 @@ setup_rest_api() ->
{ok, Options} = leo_gateway_app:get_options(),
InitFun = fun() -> leo_gateway_http_commons:start(
Options#http_options{handler = leo_gateway_rest_api}) end,
- TermFun = fun() -> leo_gateway_http_commons:stop() end,
+ TermFun = fun() -> leo_gateway_rest_api:stop() end,
setup(InitFun, TermFun).
teardown([TermFun, Node0, Node1]) ->

0 comments on commit a927aca

Please sign in to comment.