Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

COUCHDB-1060 - Fix tests

  • Loading branch information...
commit 7fbf213940cd880329578ad322961c7e8d273f91 1 parent bdc0385
@rnewson rnewson authored
View
2  share/www/script/test/cookie_auth.js
@@ -278,6 +278,8 @@ couchTests.cookie_auth = function(debug) {
[
{section: "couch_httpd_auth",
key: "authentication_db", value: "test_suite_users"},
+ {section: "couch_httpd_auth",
+ key: "iterations", value: "1"},
{section: "admins",
key: "jan", value: "apple"}
],
View
2  share/www/script/test/oauth.js
@@ -105,7 +105,7 @@ couchTests.oauth = function(debug) {
headers: {
"Authorization": adminBasicAuthHeaderValue()
}});
- if (xhr.responseText.indexOf("\"-hashed-") != 0) {
+ if (xhr.responseText.indexOf("\"-pbkdf2-") != 0) {
throw("still waiting");
}
}, "wait-for-admin");
View
10 share/www/script/test/replicator_db.js
@@ -579,6 +579,11 @@ couchTests.replicator_db = function(debug) {
var server_admins_config = [
{
+ section: "couch_httpd_auth",
+ key: "iterations",
+ value: "1"
+ },
+ {
section: "admins",
key: "fdmanana",
value: "qwerty"
@@ -1437,6 +1442,11 @@ couchTests.replicator_db = function(debug) {
// run all the tests
var server_config = [
{
+ section: "couch_httpd_auth",
+ key: "iterations",
+ value: "1"
+ },
+ {
section: "replicator",
key: "db",
value: repDb.name
View
19 share/www/script/test/users_db_security.js
@@ -75,9 +75,9 @@ couchTests.users_db_security = function(debug) {
usersDb.deleteDb();
// _users db
- // a doc with a field 'password' should be hashed to 'password_sha'
+ // a doc with a field 'password' should be hashed to 'derived_key'
// with salt and salt stored in 'salt', 'password' is set to null.
- // Exising 'password_sha' and 'salt' fields are overwritten with new values
+ // Exising 'derived_key' and 'salt' fields are overwritten with new values
// when a non-null 'password' field exists.
// anonymous should be able to create a user document
var userDoc = {
@@ -92,12 +92,17 @@ couchTests.users_db_security = function(debug) {
TEquals(true, usersDb.save(userDoc).ok, "should save document");
userDoc = usersDb.open("org.couchdb.user:jchris");
TEquals(undefined, userDoc.password, "password field should be null 1");
- TEquals(40, userDoc.password_sha.length, "password_sha should exist");
+ TEquals(40, userDoc.derived_key.length, "derived_key should exist");
TEquals(32, userDoc.salt.length, "salt should exist");
// create server admin
run_on_modified_server([
{
+ section: "couch_httpd_auth",
+ key: "iterations",
+ value: "1"
+ },
+ {
section: "admins",
key: "jan",
value: "apple"
@@ -131,12 +136,12 @@ couchTests.users_db_security = function(debug) {
var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1");
TEquals(undefined, jchrisDoc.password, "password field should be null 2");
- TEquals(40, jchrisDoc.password_sha.length, "password_sha should exist");
+ TEquals(40, jchrisDoc.derived_key.length, "derived_key should exist");
TEquals(32, jchrisDoc.salt.length, "salt should exist");
TEquals(true, userDoc.salt != jchrisDoc.salt, "should have new salt");
- TEquals(true, userDoc.password_sha != jchrisDoc.password_sha,
- "should have new password_sha");
+ TEquals(true, userDoc.derived_key != jchrisDoc.derived_key,
+ "should have new derived_key");
// user should not be able to read another user's user document
var fdmananaDoc = {
@@ -248,6 +253,8 @@ couchTests.users_db_security = function(debug) {
usersDb.deleteDb();
run_on_modified_server(
[{section: "couch_httpd_auth",
+ key: "iterations", value: "1"},
+ {section: "couch_httpd_auth",
key: "authentication_db", value: usersDb.name}],
testFun
);
Please sign in to comment.
Something went wrong with that request. Please try again.