COUCHDB-1060 - Fix tests
diff --git a/script/test/cookie_auth.js b/script/test/cookie_auth.js
index f252524..066af85 100644
--- a/script/test/cookie_auth.js
+++ b/script/test/cookie_auth.js
@@ -278,6 +278,8 @@
     [
      {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"}
     ],
diff --git a/script/test/oauth.js b/script/test/oauth.js
index 6bc4773..89d3779 100644
--- a/script/test/oauth.js
+++ b/script/test/oauth.js
@@ -105,7 +105,7 @@
             headers: {
               "Authorization": adminBasicAuthHeaderValue()
             }});
-        if (xhr.responseText.indexOf("\"-hashed-") != 0) {
+        if (xhr.responseText.indexOf("\"-pbkdf2-") != 0) {
             throw("still waiting");
         }
       }, "wait-for-admin");
diff --git a/script/test/replicator_db.js b/script/test/replicator_db.js
index 3795386..48ca341 100644
--- a/script/test/replicator_db.js
+++ b/script/test/replicator_db.js
@@ -579,6 +579,11 @@
 
     var server_admins_config = [
       {
+        section: "couch_httpd_auth",
+        key: "iterations",
+        value: "1"
+      },
+      {
         section: "admins",
         key: "fdmanana",
         value: "qwerty"
@@ -1437,6 +1442,11 @@
   // run all the tests
   var server_config = [
     {
+      section: "couch_httpd_auth",
+      key: "iterations",
+      value: "1"
+    },
+    {
       section: "replicator",
       key: "db",
       value: repDb.name
diff --git a/script/test/users_db_security.js b/script/test/users_db_security.js
index 75a4dfa..f8a9d5c 100644
--- a/script/test/users_db_security.js
+++ b/script/test/users_db_security.js
@@ -75,9 +75,9 @@
     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 @@
     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 @@
       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 @@
   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
   );