From f2292e7f24585b690a6712dd2474cddeb81cc8d3 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Thu, 13 May 2010 01:25:51 +0000 Subject: vhost_global_handlers bypass rewrite rules and are available in all vhosts git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@943764 13f79535-47bb-0310-9956-ffa450edef68 --- test/etap/160-vhosts.t | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'test/etap') diff --git a/test/etap/160-vhosts.t b/test/etap/160-vhosts.t index 64c51554..8d8dd2a7 100755 --- a/test/etap/160-vhosts.t +++ b/test/etap/160-vhosts.t @@ -54,7 +54,7 @@ config_files() -> main(_) -> test_util:init_code_path(), - etap:plan(3), + etap:plan(4), case (catch test()) of ok -> etap:end_tests(); @@ -85,7 +85,8 @@ test() -> test_regular_request(), test_vhost_request(), test_vhost_request_with_qs(), - + test_vhost_request_with_global(), + %% restart boilerplate couch_db:close(Db), couch_server:delete(list_to_binary(dbname()), []), @@ -119,3 +120,13 @@ test_vhost_request_with_qs() -> etap:is(HasRevsInfo, true, "should return _revs_info"); _Else -> false end. + +test_vhost_request_with_global() -> + Url = server() ++ "_uuids", + case ibrowse:send_req(Url, [], get, [], [{host_header, "example.com"}]) of + {ok, _, _, Body} -> + {JsonProps} = couch_util:json_decode(Body), + HasUuids = proplists:is_defined(<<"uuids">>, JsonProps), + etap:is(HasUuids, true, "should return _uuids"); + _Else -> false + end. -- cgit v1.2.3