Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 20676 invoked from network); 19 Aug 2009 02:31:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Aug 2009 02:31:51 -0000 Received: (qmail 66089 invoked by uid 500); 19 Aug 2009 02:32:10 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 66043 invoked by uid 500); 19 Aug 2009 02:32:10 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 66034 invoked by uid 99); 19 Aug 2009 02:32:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 02:32:10 +0000 X-ASF-Spam-Status: No, hits=-1997.3 required=10.0 tests=ALL_TRUSTED,FS_REPLICA,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 02:32:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8EDBF2388903; Wed, 19 Aug 2009 02:31:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r805649 - /couchdb/trunk/test/etap/110-replication-httpc.t Date: Wed, 19 Aug 2009 02:31:40 -0000 To: commits@couchdb.apache.org From: kocolosk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090819023140.8EDBF2388903@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kocolosk Date: Wed Aug 19 02:31:40 2009 New Revision: 805649 URL: http://svn.apache.org/viewvc?rev=805649&view=rev Log: make httpc test work in R12B (no macros allowed) Modified: couchdb/trunk/test/etap/110-replication-httpc.t Modified: couchdb/trunk/test/etap/110-replication-httpc.t URL: http://svn.apache.org/viewvc/couchdb/trunk/test/etap/110-replication-httpc.t?rev=805649&r1=805648&r2=805649&view=diff ============================================================================== --- couchdb/trunk/test/etap/110-replication-httpc.t (original) +++ couchdb/trunk/test/etap/110-replication-httpc.t Wed Aug 19 02:31:40 2009 @@ -35,8 +35,8 @@ conn = nil }). --define(SERVER, "http://127.0.0.1:5984/"). --define(DBNAME, "etap-test-db"). +server() -> "http://127.0.0.1:5984/". +dbname() -> "etap-test-db". main(_) -> code:add_pathz("src/couchdb"), @@ -61,8 +61,8 @@ ibrowse:start(), crypto:start(), - couch_server:delete(list_to_binary(?DBNAME), []), - {ok, Db} = couch_db:create(list_to_binary(?DBNAME), []), + couch_server:delete(list_to_binary(dbname()), []), + {ok, Db} = couch_db:create(list_to_binary(dbname()), []), test_welcome(), test_binary_url(), @@ -71,11 +71,11 @@ test_db_exists(), couch_db:close(Db), - couch_server:delete(list_to_binary(?DBNAME), []), + couch_server:delete(list_to_binary(dbname()), []), ok. test_welcome() -> - WelcomeReq = #http_db{url=?SERVER}, + WelcomeReq = #http_db{url=server()}, Expect = {[ {<<"couchdb">>, <<"Welcome">>}, {<<"version">>, list_to_binary(couch_server:get_version())} @@ -87,7 +87,7 @@ ). test_binary_url() -> - Req = #http_db{url=list_to_binary(?SERVER)}, + Req = #http_db{url=list_to_binary(server())}, Expect = {[ {<<"couchdb">>, <<"Welcome">>}, {<<"version">>, list_to_binary(couch_server:get_version())} @@ -100,7 +100,7 @@ test_put() -> Req = #http_db{ - url = ?SERVER ++ ?DBNAME ++ "/", + url = server() ++ dbname() ++ "/", resource = "test_put", body = {[{<<"foo">>, <<"bar">>}]}, method = put @@ -111,7 +111,7 @@ test_qs() -> Req = #http_db{ - url = ?SERVER ++ ?DBNAME ++ "/", + url = server() ++ dbname() ++ "/", resource = "foo", qs = [ {bar, true}, @@ -119,7 +119,7 @@ {bif, mochijson2:encode(<<"1-23456">>)} ] }, - Expect = ?SERVER ++ ?DBNAME ++ "/foo?bar=true&baz=1.03&bif=\"1-23456\"", + Expect = server() ++ dbname() ++ "/foo?bar=true&baz=1.03&bif=\"1-23456\"", etap:is( couch_rep_httpc:full_url(Req), Expect, @@ -127,7 +127,7 @@ ). test_db_exists() -> - Req1 = #http_db{url=?SERVER ++ ?DBNAME ++ "/"}, - Req2 = #http_db{url=?SERVER ++ ?DBNAME ++ "_foo/"}, + Req1 = #http_db{url=server() ++ dbname() ++ "/"}, + Req2 = #http_db{url=server() ++ dbname() ++ "_foo/"}, etap:ok(couch_rep_httpc:db_exists(Req1), "db_exists true check"), etap:is(couch_rep_httpc:db_exists(Req2), false, "db_exists false check").