summaryrefslogtreecommitdiff
path: root/test/javascript
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2016-07-12 21:40:25 +0200
committerJan Lehnardt <jan@apache.org>2016-07-12 21:40:25 +0200
commitc34d871bb1631513868f8a0594c95001e910964f (patch)
treede8a59460cfd31ceb4694a68ff8dff80a29be30a /test/javascript
parentf72b2530103dff9c2784916ead2dad5331f075f3 (diff)
downloadcouchdb-c34d871bb1631513868f8a0594c95001e910964f.tar.gz
get full suite to runauth-tests-wip
Diffstat (limited to 'test/javascript')
-rw-r--r--test/javascript/tests/users_db.js4
-rw-r--r--test/javascript/tests/users_db_security.js10
2 files changed, 6 insertions, 8 deletions
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index 9c67ec50b..074ff3182 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();
}
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index a23c1d8b0..c56f9238a 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();
};