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/11/11 23:50:27 UTC

[11/16] couchdb commit: updated refs/heads/2876-js-tests to 805a427

Bulk docs test


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

Branch: refs/heads/2876-js-tests
Commit: 69a44c0700c6c0fa17b1ca2c6a64b872e25e40a2
Parents: 218e494
Author: sebastianro <se...@apache.org>
Authored: Sat Oct 17 14:54:51 2015 +0200
Committer: sebastianro <se...@apache.org>
Committed: Sat Oct 17 14:54:51 2015 +0200

----------------------------------------------------------------------
 test/javascript/tests/bulk_docs.js | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/69a44c07/test/javascript/tests/bulk_docs.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/bulk_docs.js b/test/javascript/tests/bulk_docs.js
index 6182d19..7fc93fd 100644
--- a/test/javascript/tests/bulk_docs.js
+++ b/test/javascript/tests/bulk_docs.js
@@ -11,7 +11,6 @@
 // the License.
 
 couchTests.bulk_docs = function(debug) {
-  return console.log('TODO');
   var db_name = get_random_db_name()
   var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
   db.createDb();
@@ -73,13 +72,14 @@ couchTests.bulk_docs = function(debug) {
   // Now save the bulk docs, When we use all_or_nothing, we don't get conflict
   // checking, all docs are saved regardless of conflict status, or none are
   // saved.
-  results = db.bulkSave(docs,{all_or_nothing:true});
-  T(results.error === undefined);
-
-  var doc = db.open("0", {conflicts:true});
-  var docConflict = db.open("0", {rev:doc._conflicts[0]});
-
-  T(doc.shooby == "dooby" || docConflict.shooby == "dooby");
+// TODO: all_or_nothing is not yet supported on clusters
+//  results = db.bulkSave(docs,{all_or_nothing:true});
+//  T(results.error === undefined);
+//
+//  var doc = db.open("0", {conflicts:true});
+//  var docConflict = db.open("0", {rev:doc._conflicts[0]});
+//
+//  T(doc.shooby == "dooby" || docConflict.shooby == "dooby");
 
   // verify creating a document with no id returns a new id
   var req = CouchDB.request("POST", "/" + db_name + "/_bulk_docs", {
@@ -108,7 +108,7 @@ couchTests.bulk_docs = function(debug) {
   T(req.status == 400 );
   result = JSON.parse(req.responseText);
   T(result.error == "bad_request");
-  T(result.reason == "Missing JSON list of 'docs'");
+  T(result.reason == "POST body must include `docs` parameter.");
 
   // jira-911
   db.deleteDb();