couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject chttpd commit: updated refs/heads/1843-feature-bigcouch-eunit to edb57c1
Date Tue, 20 May 2014 19:44:07 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/1843-feature-bigcouch-eunit e5d0764e9 -> edb57c1fb (forced update)


Remove tests


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/edb57c1f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/edb57c1f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/edb57c1f

Branch: refs/heads/1843-feature-bigcouch-eunit
Commit: edb57c1fbfcdffc723b1978d7a874d0c6505e208
Parents: d3e7547
Author: Russell Branca <chewbranca@apache.org>
Authored: Tue May 20 12:43:27 2014 -0700
Committer: Russell Branca <chewbranca@apache.org>
Committed: Tue May 20 12:43:27 2014 -0700

----------------------------------------------------------------------
 test/chttpd_delayed_response_test.erl | 41 ------------------------------
 test/mock_request.erl                 | 37 ---------------------------
 2 files changed, 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/edb57c1f/test/chttpd_delayed_response_test.erl
----------------------------------------------------------------------
diff --git a/test/chttpd_delayed_response_test.erl b/test/chttpd_delayed_response_test.erl
deleted file mode 100644
index 911ef5b..0000000
--- a/test/chttpd_delayed_response_test.erl
+++ /dev/null
@@ -1,41 +0,0 @@
-%% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-%% use this file except in compliance with the License. You may obtain a copy of
-%% the License at
-%%
-%%   http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-%% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-%% License for the specific language governing permissions and limitations under
-%% the License.
-
--module(chttpd_delayed_response_test).
--include_lib("eunit/include/eunit.hrl").
--include_lib("couch/include/couch_db.hrl").
-
-all_test_() ->
-    {foreach,
-     fun() -> application:load(couch) end,
-     fun(_) -> application:unload(couch) end,
-     [
-      fun delayed_chunked_response/1,
-      fun delayed_chunked_response_after_error/1
-     ]}.
-
-delayed_chunked_response(_) ->
-    {"sending an error first should be ok",
-    fun() ->
-        Req = #httpd{mochi_req=mock_request:new(nil, get, "/", {1, 1}, [])},
-        {ok, Resp} = chttpd:start_delayed_chunked_response(Req, 200, []),
-        ?assertMatch({ok, _}, chttpd:send_delayed_error(Resp, bad_request))
-    end}.
-
-delayed_chunked_response_after_error(_) ->
-    {"sending an error midstream should throw http_abort",
-    fun() ->
-        Req = #httpd{mochi_req=mock_request:new(nil, get, "/", {1, 1}, [])},
-        {ok, Resp} = chttpd:start_delayed_chunked_response(Req, 200, []),
-        {ok, Resp1} = chttpd:send_delayed_chunk(Resp, <<>>),
-        ?assertThrow({http_abort, _, _}, chttpd:send_delayed_error(Resp1, bad_request))
-    end}.

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/edb57c1f/test/mock_request.erl
----------------------------------------------------------------------
diff --git a/test/mock_request.erl b/test/mock_request.erl
deleted file mode 100644
index 3edfd29..0000000
--- a/test/mock_request.erl
+++ /dev/null
@@ -1,37 +0,0 @@
-%% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-%% use this file except in compliance with the License. You may obtain a copy of
-%% the License at
-%%
-%%   http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-%% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-%% License for the specific language governing permissions and limitations under
-%% the License.
-
--module(mock_request, [Socket, Method, RawPath, Version, Headers]).
-
--compile(export_all).
-
-get_header_value(_) ->
-    undefined.
-
-parse_qs() ->
-    [].
-
-get(method) ->
-    Method;
-get(raw_path) ->
-    RawPath;
-get(version) ->
-    Version.
-
-should_close() ->
-    false.
-
-respond({Code, ResponseHeaders, _}) ->
-    mochiweb:new_response({THIS, Code, ResponseHeaders}).
-
-send(_) ->
-    ok.


Mime
View raw message