summaryrefslogtreecommitdiff
path: root/test/etap/130-attachments-md5.t
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2011-02-02 19:11:28 +0000
committerAdam Kocoloski <kocolosk@apache.org>2011-02-02 19:11:28 +0000
commitf8c7e2a63e6244a209c9db34b332c276c8bee8de (patch)
tree574025bccb9cf09f16f9caea488e70d9f4f67c5c /test/etap/130-attachments-md5.t
parent8fe7d459e535acdb1f2975532b6f1248f5089596 (diff)
Make server listen on an unused port during unit tests
This prevents the tests from failing when another instance of CouchDB is already running on the same machine. Also merging in the fixup of the _error resource from r1066590. COUCHDB-1049 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1066591 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap/130-attachments-md5.t')
-rwxr-xr-xtest/etap/130-attachments-md5.t8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/etap/130-attachments-md5.t b/test/etap/130-attachments-md5.t
index 4c40f83a..6296e08a 100755
--- a/test/etap/130-attachments-md5.t
+++ b/test/etap/130-attachments-md5.t
@@ -11,9 +11,6 @@
% License for the specific language governing permissions and limitations under
% the License.
-default_config() ->
- test_util:build_file("etc/couchdb/default_dev.ini").
-
test_db_name() ->
<<"etap-test-db">>.
@@ -41,11 +38,10 @@ main(_) ->
ok.
test() ->
- couch_server_sup:start_link([default_config()]),
+ couch_server_sup:start_link(test_util:config_files()),
Addr = couch_config:get("httpd", "bind_address", any),
- Port = list_to_integer(couch_config:get("httpd", "port", "5984")),
put(addr, Addr),
- put(port, Port),
+ put(port, mochiweb_socket_server:get(couch_httpd, port)),
timer:sleep(1000),
couch_server:delete(test_db_name(), []),