couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject couch commit: updated refs/heads/master to 6682a22
Date Thu, 08 Oct 2015 11:35:46 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master c0260d2ff -> 6682a220f


Fix status match for document create/update

CouchDB 2.0 returns 201 or 202 depending on the situation.


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

Branch: refs/heads/master
Commit: 6682a220fd7ab8bd11eb0c044d342592e5d62132
Parents: c0260d2
Author: Alexander Shorin <kxepal@apache.org>
Authored: Thu Oct 8 14:24:38 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu Oct 8 14:24:38 2015 +0300

----------------------------------------------------------------------
 test/global_changes_tests.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/6682a220/test/global_changes_tests.erl
----------------------------------------------------------------------
diff --git a/test/global_changes_tests.erl b/test/global_changes_tests.erl
index cf01676..e04f3bf 100644
--- a/test/global_changes_tests.erl
+++ b/test/global_changes_tests.erl
@@ -80,7 +80,8 @@ create_doc(Host, DbName, Id) ->
     Body = jiffy:encode({[
         {key, "value"}
     ]}),
-    {ok, 201, _Headers, _Body} = test_request:put(Url, Headers, Body),
+    {ok, Status, _Headers, _Body} = test_request:put(Url, Headers, Body),
+    ?assert(Status =:= 201 orelse Status =:= 202),
     timer:sleep(1000),
     ok.
 
@@ -93,7 +94,8 @@ update_doc(Host, DbName, Id, Value) ->
         {key, Value},
         {'_rev', Rev}
     ]}),
-    {ok, 201, _Headers1, _Body} = test_request:put(Url, Headers, Body),
+    {ok, Status, _Headers1, _Body} = test_request:put(Url, Headers, Body),
+    ?assert(Status =:= 201 orelse Status =:= 202),
     timer:sleep(1000),
     ok.
 


Mime
View raw message