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 2015/12/16 20:51:59 UTC
[04/50] couchdb commit: updated
refs/heads/2876-js-tests-merged-squashed to f44e15f
JS test: update reader_acl.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/acb64f09
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/acb64f09
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/acb64f09
Branch: refs/heads/2876-js-tests-merged-squashed
Commit: acb64f09524ace3c75b6c216c90250e35b12a83f
Parents: 5bf36af
Author: Jan Lehnardt <ja...@apache.org>
Authored: Wed Dec 16 20:49:31 2015 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Wed Dec 16 20:49:31 2015 +0100
----------------------------------------------------------------------
test/javascript/tests/reader_acl.js | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/acb64f09/test/javascript/tests/reader_acl.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/reader_acl.js b/test/javascript/tests/reader_acl.js
index ff770c7..e1d9c5f 100644
--- a/test/javascript/tests/reader_acl.js
+++ b/test/javascript/tests/reader_acl.js
@@ -11,13 +11,19 @@
// the License.
couchTests.reader_acl = function(debug) {
+ return console.log('TODO: config not available on cluster');
// this tests read access control
- var usersDb = new CouchDB("test_suite_users", {"X-Couch-Full-Commit":"false"});
- var secretDb = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
+ var users_db_name = get_random_db_name();
+ var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
+
+ var db_name = get_random_db_name();
+ var secretDb = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
+
+
function testFun() {
try {
- usersDb.deleteDb();
+ // usersDb.deleteDb();
try {
usersDb.createDb();
} catch(e) {
@@ -25,7 +31,7 @@ couchTests.reader_acl = function(debug) {
throw e;
}
}
- secretDb.deleteDb();
+ // secretDb.deleteDb();
secretDb.createDb();
// create a user with top-secret-clearance
@@ -201,7 +207,7 @@ 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: "test_suite_users"}],
+ key: "authentication_db", value: users_db_name}],
testFun
);
@@ -213,7 +219,10 @@ 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: "test_suite_users"}],
+ key: "authentication_db", value: users_db_name}],
testFun2
);
+
+ // cleanup
+ db.deleteDb();
}