couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [50/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871
Date Tue, 12 Jul 2016 19:41:33 GMT
get full suite to run


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

Branch: refs/heads/auth-tests-wip
Commit: c34d871bb1631513868f8a0594c95001e910964f
Parents: f72b253
Author: Jan Lehnardt <jan@apache.org>
Authored: Tue Jul 12 21:40:25 2016 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Tue Jul 12 21:40:25 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db.js          |  4 +---
 test/javascript/tests/users_db_security.js | 10 +++++-----
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c34d871b/test/javascript/tests/users_db.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index 9c67ec5..074ff31 100644
--- a/test/javascript/tests/users_db.js
+++ b/test/javascript/tests/users_db.js
@@ -104,7 +104,6 @@ couchTests.users_db = function(debug) {
       });
       T(false && "this will throw");
     } catch(e) {
-      log(e.error)
       T(e.error == "unauthorized");
       T(/conflict/.test(e.reason));
     }
@@ -208,9 +207,8 @@ couchTests.users_db = function(debug) {
         usersDb.deleteDb(); // cleanup
         usersDb.createDb();
         usersDbAlt.deleteDb(); // cleanup
-        CouchDB.logout();
       }
     }
   );
-
+  CouchDB.logout();
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c34d871b/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index a23c1d8..c56f923 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -94,7 +94,7 @@ couchTests.users_db_security = function(debug) {
 
     // jan's gonna be admin as he's the first user
     TEquals(true, usersDb.save(userDoc).ok, "should save document");
-    // wait(5000)
+    wait(5000)
     userDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris");
     TEquals(undefined, userDoc.password, "password field should be null 1");
     TEquals(40, userDoc.derived_key.length, "derived_key should exist");
@@ -147,7 +147,7 @@ couchTests.users_db_security = function(debug) {
     };
 
     usersDb.save(fdmananaDoc);
-    var fdmananaDocAsReadByjchris = open_as(usersDb, "org.couchdb.user:fdmanana", "jchris");
+    var fdmananaDocAsReadByjchris = open_as(usersDb, "org.couchdb.user:fdmanana", "jchris1");
     TEquals(null, fdmananaDocAsReadByjchris,
       "should not_found opening another user's user doc");
 
@@ -202,7 +202,7 @@ couchTests.users_db_security = function(debug) {
 
     // non-admins can't read design docs
     try {
-      open_as(usersDb, "_design/user_db_auth", "jchris");
+      open_as(usersDb, "_design/user_db_auth", "jchris1");
       T(false, "non-admin read design doc, should not happen");
     } catch(e) {
       TEquals("forbidden", e.error, "non-admins can't read design docs");
@@ -306,7 +306,7 @@ couchTests.users_db_security = function(debug) {
         value: "false"
       }
     ], function() {
-      TEquals(true, CouchDB.login("jchris", "mp3").ok);
+      TEquals(true, CouchDB.login("jchris", "couch").ok);
 
       try {
         var all = usersDb.allDocs({ include_docs: true });
@@ -339,8 +339,8 @@ couchTests.users_db_security = function(debug) {
         CouchDB.login("jan", "apple");
         usersDb.deleteDb(); // cleanup
         usersDb.createDb();
-        CouchDB.logout();
       }
     }
   );
+  CouchDB.logout();
 };


Mime
View raw message