summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastianro <sebastianro@apache.org>2016-04-14 19:15:12 +0200
committerJan Lehnardt <jan@apache.org>2016-04-23 12:25:33 +0200
commit27b1fda61802c712ba0c60b8e6a8ce4604cd8232 (patch)
tree364095b7fd6463fdc69396cf24f0deadd47c9b7d
parentd61fdf2a60774cd161c7c453ccb398bd65853d08 (diff)
downloadcouchdb-27b1fda61802c712ba0c60b8e6a8ce4604cd8232.tar.gz
Revive reader acl test
-rw-r--r--test/javascript/tests/reader_acl.js30
1 files changed, 8 insertions, 22 deletions
diff --git a/test/javascript/tests/reader_acl.js b/test/javascript/tests/reader_acl.js
index e1d9c5fbd..a76f2803b 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();
}