You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/09/05 04:30:26 UTC

[47/50] [abbrv] couch commit: updated refs/heads/1963-eunit-bigcouch to 2b2f129

Update ini include paths


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

Branch: refs/heads/1963-eunit-bigcouch
Commit: 2b2f12958fd8e5784040f482bd9d405eae63b4db
Parents: a203926
Author: Russell Branca <ch...@apache.org>
Authored: Fri Aug 29 13:31:06 2014 -0700
Committer: Russell Branca <ch...@apache.org>
Committed: Thu Sep 4 14:37:35 2014 -0700

----------------------------------------------------------------------
 include/couch_eunit.hrl           | 10 ++++++----
 src/test_util.erl                 | 13 ++++---------
 test/couchdb_http_proxy_tests.erl |  2 +-
 3 files changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2b2f1295/include/couch_eunit.hrl
----------------------------------------------------------------------
diff --git a/include/couch_eunit.hrl b/include/couch_eunit.hrl
index d6d7278..20a2033 100644
--- a/include/couch_eunit.hrl
+++ b/include/couch_eunit.hrl
@@ -24,14 +24,16 @@
                 Dir
         end
     end).
+-define(CONFIG_DEFAULT,
+    filename:join([?BUILDDIR(), "tmp", "etc", "default_eunit.ini"])).
 -define(CONFIG_CHAIN, [
-    filename:join([?BUILDDIR(), "etc", "couchdb", "default_dev.ini"]),
-    filename:join([?BUILDDIR(), "etc", "couchdb", "local_dev.ini"]),
-    filename:join([?BUILDDIR(), "etc", "couchdb", "eunit.ini"])]).
+    ?CONFIG_DEFAULT,
+    filename:join([?BUILDDIR(), "tmp", "etc", "local_eunit.ini"]),
+    filename:join([?BUILDDIR(), "tmp", "etc", "eunit.ini"])]).
 -define(FIXTURESDIR,
     filename:join([?BUILDDIR(), "src", "couch", "test", "fixtures"])).
 -define(TEMPDIR,
-    filename:join([?BUILDDIR(), "test", "temp"])).
+    filename:join([?BUILDDIR(), "tmp", "tmp_data"])).
 
 -define(tempfile,
     fun() ->

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2b2f1295/src/test_util.erl
----------------------------------------------------------------------
diff --git a/src/test_util.erl b/src/test_util.erl
index 333b16b..3f90330 100644
--- a/src/test_util.erl
+++ b/src/test_util.erl
@@ -12,8 +12,10 @@
 
 -module(test_util).
 
+-include_lib("couch/include/couch_eunit.hrl").
+
 -export([init_code_path/0]).
--export([source_file/1, build_file/1, config_files/0]).
+-export([source_file/1, build_file/1]).
 %% -export([run/2]).
 -export([request/3, request/4]).
 -export([start_couch/0, start_couch/1, stop_couch/0, stop_couch/1]).
@@ -46,13 +48,6 @@ source_file(Name) ->
 build_file(Name) ->
     filename:join([builddir(), Name]).
 
-config_files() ->
-    [
-        build_file("etc/couchdb/default_dev.ini"),
-        build_file("test/random_port.ini"),
-        build_file("etc/couchdb/local_dev.ini")
-    ].
-
 
 request(Url, Headers, Method) ->
     request(Url, Headers, Method, []).
@@ -84,7 +79,7 @@ request(Url, Headers, Method, Body, N) ->
 
 
 start_couch() ->
-    start_couch(config_files()).
+    start_couch(?CONFIG_CHAIN).
 
 
 start_couch(IniFiles) ->

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2b2f1295/test/couchdb_http_proxy_tests.erl
----------------------------------------------------------------------
diff --git a/test/couchdb_http_proxy_tests.erl b/test/couchdb_http_proxy_tests.erl
index 28ac02a..1752256 100644
--- a/test/couchdb_http_proxy_tests.erl
+++ b/test/couchdb_http_proxy_tests.erl
@@ -33,7 +33,7 @@ start() ->
     % we have to write any config changes to temp ini file to not loose them
     % when supervisor will kill all children due to reaching restart threshold
     % (each httpd_global_handlers changes causes couch_httpd restart)
-    ok = test_util:start_couch(test_util:config_files() ++ [?CONFIG_FIXTURE_TEMP]),
+    ok = test_util:start_couch(?CONFIG_CHAIN ++ [?CONFIG_FIXTURE_TEMP]),
     % 49151 is IANA Reserved, let's assume no one is listening there
     config:set("httpd_global_handlers", "_error",
         "{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:49151/\">>}"