You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/10/08 13:35:46 UTC

couch commit: updated refs/heads/master to 6682a22

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 <kx...@apache.org>
Authored: Thu Oct 8 14:24:38 2015 +0300
Committer: Alexander Shorin <kx...@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.