couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [44/50] couchdb commit: updated refs/heads/2876-js-tests-merged-squashed to f44e15f
Date Wed, 16 Dec 2015 19:52:39 GMT
JS test: update view_multi_key_all_docs.js for 2.0


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

Branch: refs/heads/2876-js-tests-merged-squashed
Commit: e465a24df28509ad4ee1205252056aeaee51f3c4
Parents: 65607a7
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Dec 16 20:49:34 2015 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Wed Dec 16 20:49:34 2015 +0100

----------------------------------------------------------------------
 test/javascript/tests/view_multi_key_all_docs.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e465a24d/test/javascript/tests/view_multi_key_all_docs.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/view_multi_key_all_docs.js b/test/javascript/tests/view_multi_key_all_docs.js
index 7c7f6f8..6704a0f 100644
--- a/test/javascript/tests/view_multi_key_all_docs.js
+++ b/test/javascript/tests/view_multi_key_all_docs.js
@@ -11,8 +11,8 @@
 // the License.
 
 couchTests.view_multi_key_all_docs = function(debug) {
-  var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
-  db.deleteDb();
+  var db_name = get_random_db_name();
+  var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
   db.createDb();
   if (debug) debugger;
 
@@ -72,7 +72,7 @@ couchTests.view_multi_key_all_docs = function(debug) {
   T(rows[0].id == keys[1]);
 
   // Check we get invalid rows when the key doesn't exist
-  rows = db.allDocs({}, [1, "i_dont_exist", "0"]).rows;
+  rows = db.allDocs({}, ["1111", "i_dont_exist", "0"]).rows;
   T(rows.length == 3);
   T(rows[0].error == "not_found");
   T(!rows[0].id);
@@ -81,7 +81,7 @@ couchTests.view_multi_key_all_docs = function(debug) {
   T(rows[2].id == rows[2].key && rows[2].key == "0");
 
   // keys in GET parameters
-  rows = db.allDocs({keys: [1, "i_dont_exist", "0"]}, null).rows;
+  rows = db.allDocs({keys: ["1211", "i_dont_exist", "0"]}, null).rows;
   T(rows.length == 3);
   T(rows[0].error == "not_found");
   T(!rows[0].id);
@@ -92,4 +92,7 @@ couchTests.view_multi_key_all_docs = function(debug) {
   // empty keys
   rows = db.allDocs({keys: []}, null).rows;
   T(rows.length == 0);
+
+  // cleanup
+  db.deleteDb();
 };


Mime
View raw message