You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2016/04/23 12:26:00 UTC

[04/10] couchdb commit: updated refs/heads/master to 82d2eb1

Revive reader acl test


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

Branch: refs/heads/master
Commit: 27b1fda61802c712ba0c60b8e6a8ce4604cd8232
Parents: d61fdf2
Author: sebastianro <se...@apache.org>
Authored: Thu Apr 14 19:15:12 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Sat Apr 23 12:25:33 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/reader_acl.js | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/27b1fda6/test/javascript/tests/reader_acl.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/reader_acl.js b/test/javascript/tests/reader_acl.js
index e1d9c5f..a76f280 100644
--- a/test/javascript/tests/reader_acl.js
+++ b/test/javascript/tests/reader_acl.js
@@ -11,7 +11,6 @@
 // the License.
 
 couchTests.reader_acl = function(debug) {
-  return console.log('TODO: config not available on cluster');
   // this tests read access control
 
   var users_db_name = get_random_db_name();
@@ -57,10 +56,6 @@ couchTests.reader_acl = function(debug) {
     } finally {
       CouchDB.logout();
     }
-  }
-  
-  // split into 2 funs so we can test restart behavior
-  function testFun2() {
     try {
       // can't read it as jchris b/c he's missing the needed role
       T(CouchDB.login("jchris@apache.org", "funnybone").ok);
@@ -94,10 +89,10 @@ couchTests.reader_acl = function(debug) {
       // db admin can read
       T(secretDb.open("baz").foo == "bar");
 
-      // and run temp views
-      TEquals(secretDb.query(function(doc) {
+      // and run temp views - they don't exist any more, so leave out 
+      /*TEquals(secretDb.query(function(doc) {
         emit(null, null)
-      }).total_rows, 1);
+      }).total_rows, 1);*/
 
       CouchDB.logout();
       T(CouchDB.session().userCtx.roles.indexOf("_admin") != -1);
@@ -207,22 +202,13 @@ couchTests.reader_acl = function(debug) {
       key: "authentication_handlers",
       value: "{couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}"},
      {section: "couch_httpd_auth",
+      key: "authentication_db", value: users_db_name},
+     {section: "chttpd_auth",
       key: "authentication_db", value: users_db_name}],
-    testFun
+    testFun  // stick to the essentials and do it all in one
   );
         
-  // security changes will always commit synchronously
-  restartServer();
-  
-  run_on_modified_server(
-    [{section: "httpd",
-      key: "authentication_handlers",
-      value: "{couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}"},
-     {section: "couch_httpd_auth",
-      key: "authentication_db", value: users_db_name}],
-    testFun2
-  );
-
   // cleanup
-  db.deleteDb();
+  usersDb.deleteDb();
+  secretDb.deleteDb();
 }