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 2016/07/12 19:40:44 UTC

[01/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871 [Forced Update!]

Repository: couchdb
Updated Branches:
  refs/heads/auth-tests-wip 7ac805e37 -> c34d871bb (forced update)


Use couch_file:delete/3 in views cleanup


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/920489d4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/920489d4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/920489d4

Branch: refs/heads/auth-tests-wip
Commit: 920489d493ece862cee7b963ffbaacb2eb20cbe5
Parents: 9dec296
Author: Eric Avdey <ei...@eiri.ca>
Authored: Mon May 16 16:11:43 2016 -0300
Committer: Eric Avdey <ei...@eiri.ca>
Committed: Mon May 16 16:11:43 2016 -0300

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/920489d4/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index d4cbdf6..98f4fd0 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -32,7 +32,7 @@ DepDescs = [
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "49774f269a6a42af05ead4f17b52edda5f065c78"},
 {couch_index,      "couch-index",      "e8c8ca8b0bb66193f1ba7e4b1d7e4a3817d661ab"},
-{couch_mrview,     "couch-mrview",     "56b66b48390732d1bbb2917ca25c4cdb3e196d1e"},
+{couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
 {couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
 {couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},


[14/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
global-changes: add missing change_callback implementation


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d2374445
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d2374445
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d2374445

Branch: refs/heads/auth-tests-wip
Commit: d2374445acfd8bfef67672ca9df247619bef9cc5
Parents: f65cf4c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:20:53 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/d2374445/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 0c60af8..4e62684 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -45,7 +45,7 @@ DepDescs = [
 {fabric,           "fabric",           "2eb1e132e01928a681782c788920c85ce24bfe06"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
-{global_changes,   "global-changes",   "40e88fc7b95017270400e4fa78c3357f125fb0f0"},
+{global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},
 {goldrush,         "goldrush",         {tag, "0.1.6"}},
 {ibrowse,          "ibrowse",          "4af2d408607874d124414ac45df1edbe3961d1cd"},
 {ioq,              "ioq",              "c7c75ebeaf41599e3a3e211097d864f0e7785829"},


[34/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Emit error row for a null doc id in POSTs to _all_docs

This is compatible behavior with CouchDB 1.x

Jira: COUCHDB-3039


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/aa0c08c2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/aa0c08c2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/aa0c08c2

Branch: refs/heads/auth-tests-wip
Commit: aa0c08c2d48dcf20ecdc8b0bd4a1b6aee6b1b56c
Parents: 1b38ccd
Author: Nick Vatamaniuc <va...@gmail.com>
Authored: Fri Jun 24 12:40:50 2016 -0400
Committer: Nick Vatamaniuc <va...@gmail.com>
Committed: Fri Jun 24 12:40:50 2016 -0400

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/aa0c08c2/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 1860fce..bb84945 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "2dda387ea5cc21861d8797ea2c8a82c3b439d55f", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "da85db2dabe371296c54fded76d1de61289f3319"},
+{fabric,           "fabric",           "aa17ddf3c149a7ac5316e5c821d0d704ac857960"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},


[47/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
More users_db_security.js work.

take out nested, superfluous run_on_modified_server calls

update to latest fabric.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b124719e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b124719e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b124719e

Branch: refs/heads/auth-tests-wip
Commit: b124719e84c020b996f4b5bfeb577ebda99d36f5
Parents: c2fd04d
Author: Jan Lehnardt <ja...@apache.org>
Authored: Thu Jun 23 12:24:48 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:59 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db_security.js | 402 +++++++++++-------------
 1 file changed, 176 insertions(+), 226 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b124719e/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index e66b3ec..da51b23 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -94,256 +94,211 @@ 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)
     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");
     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"
-        }
-      ], function() {
 
-      // anonymous should not be able to read an existing user's user document
-      var res = usersDb.open("org.couchdb.user:jchris");
-      TEquals(null, res, "anonymous user doc read should be not found");
+    // anonymous should not be able to read an existing user's user document
+    var res = usersDb.open("org.couchdb.user:jchris");
+    TEquals(null, res, "anonymous user doc read should be not found");
 
-      // anonymous should not be able to read /_users/_changes
-      try {
-        var ch = usersDb.changes();
-        T(false, "anonymous can read _changes");
-      } catch(e) {
-        TEquals("unauthorized", e.error, "anoymous can't read _changes");
-      }
+    // anonymous should not be able to read /_users/_changes
+    try {
+      var ch = usersDb.changes();
+      T(false, "anonymous can read _changes");
+    } catch(e) {
+      TEquals("unauthorized", e.error, "anoymous can't read _changes");
+    }
 
-      // user should be able to read their own document
-      var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris");
-      TEquals("org.couchdb.user:jchris", jchrisDoc._id);
-
-      // user should not be able to read /_users/_changes
-      var changes = changes_as(usersDb, "jchris");
-      TEquals("unauthorized", changes.error, "user can't read _changes");
-
-      // new 'password' fields should trigger new hashing routine
-      jchrisDoc.password = "couch";
-
-      TEquals(true, save_as(usersDb, jchrisDoc, "jchris").ok);
-      wait(5000);
-      var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1");
-
-      TEquals(undefined, jchrisDoc.password, "password field should be null 2");
-      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.derived_key != jchrisDoc.derived_key,
-        "should have new derived_key");
-
-      wait(5000); // wait for auth cache invalidation
-      var r = CouchDB.login("rnewson", "plaintext_password")
-      log(r)
-      TEquals(true, r.ok);
-      rnewsonDoc = open_as(usersDb, rnewsonDoc._id, "rnewson");
-      TEquals("pbkdf2", rnewsonDoc.password_scheme);
-      T(rnewsonDoc.salt != salt);
-      T(!rnewsonDoc.password_sha);
-      T(rnewsonDoc.derived_key);
-      T(rnewsonDoc.iterations);
-
-      salt = rnewsonDoc.salt,
-      derived_key = rnewsonDoc.derived_key,
-      iterations = rnewsonDoc.iterations;
-
-      // check that authentication is still working
-      // and everything is staying the same now
-      CouchDB.logout();
-      TEquals(true, CouchDB.login("rnewson", "plaintext_password").ok);
-      rnewsonDoc = usersDb.open(rnewsonDoc._id);
-      TEquals("pbkdf2", rnewsonDoc.password_scheme);
-      TEquals(salt, rnewsonDoc.salt);
-      T(!rnewsonDoc.password_sha);
-      TEquals(derived_key, rnewsonDoc.derived_key);
-      TEquals(iterations, rnewsonDoc.iterations);
+    // user should be able to read their own document
+    var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris");
+    TEquals("org.couchdb.user:jchris", jchrisDoc._id);
 
-      CouchDB.logout();
+    // user should not be able to read /_users/_changes
+    var changes = changes_as(usersDb, "jchris");
+    TEquals("unauthorized", changes.error, "user can't read _changes");
 
-      // user should not be able to read another user's user document
-      var fdmananaDoc = {
-        _id: "org.couchdb.user:fdmanana",
-        type: "user",
-        name: "fdmanana",
-        password: "foobar",
-        roles: []
-      };
-
-      usersDb.save(fdmananaDoc);
-
-      var fdmananaDocAsReadByjchris =
-        open_as(usersDb, "org.couchdb.user:fdmanana", "jchris1");
-      TEquals(null, fdmananaDocAsReadByjchris,
-        "should not_found opening another user's user doc");
-
-
-      // save a db admin
-      var benoitcDoc = {
-        _id: "org.couchdb.user:benoitc",
-        type: "user",
-        name: "benoitc",
-        password: "test",
-        roles: ["user_admin"]
-      };
-      save_as(usersDb, benoitcDoc, "jan");
+    // new 'password' fields should trigger new hashing routine
+    jchrisDoc.password = "couch";
 
-      TEquals(true, CouchDB.login("jan", "apple").ok);
-      T(usersDb.setSecObj({
-        "admins" : {
-          roles : [],
-          names : ["benoitc"]
-        }
-      }).ok);
-      CouchDB.logout();
+    TEquals(true, save_as(usersDb, jchrisDoc, "jchris").ok);
+    // wait(5000);
+    var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1");
 
-      // user should not be able to read from any view
-      var ddoc = {
-        _id: "_design/user_db_auth",
-        views: {
-          test: {
-            map: "function(doc) { emit(doc._id, null); }"
-          }
-        }
-      };
+    TEquals(undefined, jchrisDoc.password, "password field should be null 2");
+    TEquals(40, jchrisDoc.derived_key.length, "derived_key should exist");
+    TEquals(32, jchrisDoc.salt.length, "salt should exist");
 
-      save_as(usersDb, ddoc, "jan");
+    TEquals(true, userDoc.salt != jchrisDoc.salt, "should have new salt");
+    TEquals(true, userDoc.derived_key != jchrisDoc.derived_key,
+      "should have new derived_key");
 
-      try {
-        usersDb.view("user_db_auth/test");
-        T(false, "user had access to view in admin db");
-      } catch(e) {
-        TEquals("forbidden", e.error,
-        "non-admins should not be able to read a view");
-      }
+    // user should not be able to read another user's user document
+    var fdmananaDoc = {
+      _id: "org.couchdb.user:fdmanana",
+      type: "user",
+      name: "fdmanana",
+      password: "foobar",
+      roles: []
+    };
 
-      // admin should be able to read from any view
-      var result = view_as(usersDb, "user_db_auth/test", "jan");
-      TEquals(4, result.total_rows, "should allow access and list four users to admin");
+    usersDb.save(fdmananaDoc);
 
-      // db admin should be able to read from any view
-      var result = view_as(usersDb, "user_db_auth/test", "benoitc");
-      TEquals(4, result.total_rows, "should allow access and list four users to db admin");
+    var fdmananaDocAsReadByjchris =
+      open_as(usersDb, "org.couchdb.user:fdmanana", "jchris1");
+    TEquals(null, fdmananaDocAsReadByjchris,
+      "should not_found opening another user's user doc");
 
 
-      // non-admins can't read design docs
-      try {
-        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");
-      }
-
-      // admin should be able to read and edit any user doc
-      fdmananaDoc.password = "mobile";
-      var result = save_as(usersDb, fdmananaDoc, "jan");
-      TEquals(true, result.ok, "admin should be able to update any user doc");
-
-      // admin should be able to read and edit any user doc
-      fdmananaDoc.password = "mobile1";
-      var result = save_as(usersDb, fdmananaDoc, "benoitc");
-      TEquals(true, result.ok, "db admin by role should be able to update any user doc");
+    // save a db admin
+    var benoitcDoc = {
+      _id: "org.couchdb.user:benoitc",
+      type: "user",
+      name: "benoitc",
+      password: "test",
+      roles: ["user_admin"]
+    };
+    save_as(usersDb, benoitcDoc, "jan");
 
-      TEquals(true, CouchDB.login("jan", "apple").ok);
-      T(usersDb.setSecObj({
-        "admins" : {
-          roles : ["user_admin"],
-          names : []
+    TEquals(true, CouchDB.login("jan", "apple").ok);
+    T(usersDb.setSecObj({
+      "admins" : {
+        roles : [],
+        names : ["benoitc"]
+      }
+    }).ok);
+    CouchDB.logout();
+
+    // user should not be able to read from any view
+    var ddoc = {
+      _id: "_design/user_db_auth",
+      views: {
+        test: {
+          map: "function(doc) { emit(doc._id, null); }"
         }
-      }).ok);
-      CouchDB.logout();
+      }
+    };
 
-      // db admin should be able to read and edit any user doc
-      fdmananaDoc.password = "mobile2";
-      var result = save_as(usersDb, fdmananaDoc, "benoitc");
-      TEquals(true, result.ok, "db admin should be able to update any user doc");
+    save_as(usersDb, ddoc, "jan");
 
-      // ensure creation of old-style docs still works
-      var robertDoc = CouchDB.prepareUserDoc({ name: "robert" }, "anchovy");
-      var result = usersDb.save(robertDoc);
-      TEquals(true, result.ok, "old-style user docs should still be accepted");
+    try {
+      usersDb.view("user_db_auth/test");
+      T(false, "user had access to view in admin db");
+    } catch(e) {
+      TEquals("forbidden", e.error,
+      "non-admins should not be able to read a view");
+    }
 
-      // log in one last time so run_on_modified_server can clean up the admin account
-      TEquals(true, CouchDB.login("jan", "apple").ok);
-    });
+    // admin should be able to read from any view
+    var result = view_as(usersDb, "user_db_auth/test", "jan");
+    TEquals(3, result.total_rows, "should allow access and list four users to admin");
 
-    run_on_modified_server([
-        {
-          section: "couch_httpd_auth",
-          key: "iterations",
-          value: "1"
-        },
-        {
-          section: "couch_httpd_auth",
-          key: "public_fields",
-          value: "name,type"
-        },
-        {
-          section: "couch_httpd_auth",
-          key: "users_db_public",
-          value: "true"
-        },
-        {
-          section: "admins",
-          key: "jan",
-          value: "apple"
-        }
-      ], function() {
-        var res = usersDb.open("org.couchdb.user:jchris");
-        TEquals("jchris", res.name);
-        TEquals("user", res.type);
-        TEquals(undefined, res.roles);
-        TEquals(undefined, res.salt);
-        TEquals(undefined, res.password_scheme);
-        TEquals(undefined, res.derived_key);
+    // db admin should be able to read from any view
+    var result = view_as(usersDb, "user_db_auth/test", "benoitc");
+    TEquals(3, result.total_rows, "should allow access and list four users to db admin");
 
-        TEquals(true, CouchDB.login("jchris", "couch").ok);
 
-        var all = usersDb.allDocs({ include_docs: true });
-        T(all.rows);
-        if (all.rows) {
-          T(all.rows.every(function(row) {
-            if (row.doc) {
-              return Object.keys(row.doc).every(function(key) {
-                return key === 'name' || key === 'type';
-              });
-            } else {
-              if(row.id[0] == "_") {
-                // ignore design docs
-                return true
-              } else {
-                return false;
-              }
-            }
-          }));
-        }
-      // log in one last time so run_on_modified_server can clean up the admin account
-      TEquals(true, CouchDB.login("jan", "apple").ok);
-    });
+    // non-admins can't read design docs
+    try {
+      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");
+    }
+
+    // admin should be able to read and edit any user doc
+    fdmananaDoc.password = "mobile";
+    var result = save_as(usersDb, fdmananaDoc, "jan");
+    TEquals(true, result.ok, "admin should be able to update any user doc");
+
+    // admin should be able to read and edit any user doc
+    fdmananaDoc.password = "mobile1";
+    var result = save_as(usersDb, fdmananaDoc, "benoitc");
+    TEquals(true, result.ok, "db admin by role should be able to update any user doc");
+
+    TEquals(true, CouchDB.login("jan", "apple").ok);
+    T(usersDb.setSecObj({
+      "admins" : {
+        roles : ["user_admin"],
+        names : []
+      }
+    }).ok);
+    CouchDB.logout();
+
+    // db admin should be able to read and edit any user doc
+    fdmananaDoc.password = "mobile2";
+    var result = save_as(usersDb, fdmananaDoc, "benoitc");
+    TEquals(true, result.ok, "db admin should be able to update any user doc");
+
+    // ensure creation of old-style docs still works
+    var robertDoc = CouchDB.prepareUserDoc({ name: "robert" }, "anchovy");
+    var result = usersDb.save(robertDoc);
+    TEquals(true, result.ok, "old-style user docs should still be accepted");
+
+    // log in one last time so run_on_modified_server can clean up the admin account
+    TEquals(true, CouchDB.login("jan", "apple").ok);
+
+    // run_on_modified_server([
+   //      {
+   //        section: "couch_httpd_auth",
+   //        key: "iterations",
+   //        value: "1"
+   //      },
+   //      {
+   //        section: "couch_httpd_auth",
+   //        key: "public_fields",
+   //        value: "name,type"
+   //      },
+   //      {
+   //        section: "couch_httpd_auth",
+   //        key: "users_db_public",
+   //        value: "true"
+   //      },
+   //      {
+   //        section: "admins",
+   //        key: "jan",
+   //        value: "apple"
+   //      }
+   //    ], function() {
+   //      var res = usersDb.open("org.couchdb.user:jchris");
+   //      TEquals("jchris", res.name);
+   //      TEquals("user", res.type);
+   //      TEquals(undefined, res.roles);
+   //      TEquals(undefined, res.salt);
+   //      TEquals(undefined, res.password_scheme);
+   //      TEquals(undefined, res.derived_key);
+   //
+   //      TEquals(true, CouchDB.login("jan", "apple").ok);
+   //
+   //      var all = usersDb.allDocs({ include_docs: true });
+   //      T(all.rows);
+   //      if (all.rows) {
+   //        T(all.rows.every(function(row) {
+   //          if (row.doc) {
+   //            return Object.keys(row.doc).every(function(key) {
+   //              return key === 'name' || key === 'type';
+   //            });
+   //          } else {
+   //            if(row.id[0] == "_") {
+   //              // ignore design docs
+   //              return true
+   //            } else {
+   //              return false;
+   //            }
+   //          }
+   //        }));
+   //      }
+   //    // log in one last time so run_on_modified_server can clean up the admin account
+   //    TEquals(true, CouchDB.login("jan", "apple").ok);
+   //  });
 
     run_on_modified_server([
       {
         section: "couch_httpd_auth",
-        key: "iterations",
-        value: "1"
-      },
-      {
-        section: "couch_httpd_auth",
         key: "public_fields",
         value: "name"
       },
@@ -351,11 +306,6 @@ couchTests.users_db_security = function(debug) {
         section: "couch_httpd_auth",
         key: "users_db_public",
         value: "false"
-      },
-      {
-        section: "admins",
-        key: "jan",
-        value: "apple"
       }
     ], function() {
       TEquals(true, CouchDB.login("jchris", "couch").ok);
@@ -364,7 +314,7 @@ couchTests.users_db_security = function(debug) {
         var all = usersDb.allDocs({ include_docs: true });
         T(false); // should never hit
       } catch(e) {
-        TEquals("forbidden", e.error, "should throw");
+        TEquals("unauthorized", e.error, "should throw");
       }
 
       // COUCHDB-1888 make sure admins always get all fields
@@ -387,5 +337,5 @@ couchTests.users_db_security = function(debug) {
     testFun
   );
   usersDb.deleteDb(); // cleanup
-
+  // wait(2000)
 };


[02/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Update to latest mrview

This brings in the following changes:

- Render update_seq if number or binary
- Use ioq to separately prioritise view updates
- Make view updater couch_work_queue configurable
- Use couch_file:delete/3 in views cleanup

Remote branch 'github/pr/416'

This closes #416


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d074b5c7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d074b5c7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d074b5c7

Branch: refs/heads/auth-tests-wip
Commit: d074b5c7ad24d79c344710535a0ee8cd533ffc41
Parents: b166e8f 920489d
Author: Eric Avdey <ei...@eiri.ca>
Authored: Wed May 18 09:30:20 2016 -0300
Committer: Eric Avdey <ei...@eiri.ca>
Committed: Wed May 18 09:31:37 2016 -0300

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[50/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
get full suite to run


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c34d871b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c34d871b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c34d871b

Branch: refs/heads/auth-tests-wip
Commit: c34d871bb1631513868f8a0594c95001e910964f
Parents: f72b253
Author: Jan Lehnardt <ja...@apache.org>
Authored: Tue Jul 12 21:40:25 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 21:40:25 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db.js          |  4 +---
 test/javascript/tests/users_db_security.js | 10 +++++-----
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c34d871b/test/javascript/tests/users_db.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index 9c67ec5..074ff31 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();
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c34d871b/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index a23c1d8..c56f923 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();
 };


[03/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Implement a way to disable recompaction

Update deps to enable new functionality:

- couch_index
- couch_tests


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fc091fde
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fc091fde
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fc091fde

Branch: refs/heads/auth-tests-wip
Commit: fc091fdee9582ecf2f33f2cdd919878008eb7de6
Parents: d074b5c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Tue May 24 11:34:11 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Tue May 24 11:34:11 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fc091fde/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 98f4fd0..2f9f0ce 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -31,14 +31,14 @@ DepDescs = [
 {couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "49774f269a6a42af05ead4f17b52edda5f065c78"},
-{couch_index,      "couch-index",      "e8c8ca8b0bb66193f1ba7e4b1d7e4a3817d661ab"},
+{couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
 {couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
 {couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
 {couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},
 {couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
 {couch_peruser,    "peruser",          "ff7d190970a46722137fbc7a1a75466e8a544ae1"},
-{couch_tests,       "erlang-tests",    "cba29c894aace569f13e6bf83bc6ef06fd448712"},
+{couch_tests,       "erlang-tests",    "37b3bfeb4b1a48a592456e67991362e155ed81e0"},
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},


[30/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge branch '3040-fix-default-ini' of https://github.com/wohali/couchdb


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3f1b0c4e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3f1b0c4e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3f1b0c4e

Branch: refs/heads/auth-tests-wip
Commit: 3f1b0c4e2da8cb8b2390d62412cdf0d0c0bd47c4
Parents: 5e8041e c5dcb48
Author: Joan Touzet <wo...@apache.org>
Authored: Mon Jun 20 16:13:45 2016 -0400
Committer: Joan Touzet <wo...@apache.org>
Committed: Mon Jun 20 16:13:45 2016 -0400

----------------------------------------------------------------------
 dev/run | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)
----------------------------------------------------------------------



[38/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge remote branch 'cloudant:update-chttpd'

This closes #428

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0fef309c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0fef309c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0fef309c

Branch: refs/heads/auth-tests-wip
Commit: 0fef309ccd1e60dbaccce1cee8236599550b2a31
Parents: 9f0d22f af9513f
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Thu Jun 30 11:40:30 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Thu Jun 30 11:40:30 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[36/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge remote branch 'cloudant:2384-specify_config_file_in_args'

This closes #426

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9f0d22fc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9f0d22fc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9f0d22fc

Branch: refs/heads/auth-tests-wip
Commit: 9f0d22fc5b38032a6de15d4f47f5e14bd7b58d6c
Parents: aa0c08c 9be42f6
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Jun 27 16:22:40 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Jun 27 16:22:40 2016 -0700

----------------------------------------------------------------------
 rel/overlay/bin/couchdb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[12/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
couch_log: fix typespec


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7cd1088b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7cd1088b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7cd1088b

Branch: refs/heads/auth-tests-wip
Commit: 7cd1088ba0b67a2b293e19914fedf6b6fa7ddd9f
Parents: fdb37b1
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 06:59:06 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7cd1088b/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 9638275..8311942 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -27,7 +27,7 @@ DepDescs = [
 {config,           "config",           "60977f81dc06af4a3d1e89891b3061ed4cd01e95"},
 %% keep these sorted
 {b64url,           "b64url",           "319fc604235ab1fde37047b38a432450161db750"},
-{couch_log,        "couch-log",        "e4abbd3874356dc7a201b09676e27ff7dc8bed7c"},
+{couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "49774f269a6a42af05ead4f17b52edda5f065c78"},


[08/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fabric: Improve fabric:get_doc_count type spec


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ea9bfa98
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ea9bfa98
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ea9bfa98

Branch: refs/heads/auth-tests-wip
Commit: ea9bfa98939eb4f9bc2b4cea89410961a0a502e9
Parents: f069ffe
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:07:21 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/ea9bfa98/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 0068539..feca96f 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "f0d6c03e425473e784fbb815f48f1cca606f91f1"},
+{fabric,           "fabric",           "c449ab22431658173af45a6599d9875883adb911"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},


[20/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fabric: Fix return type in get_all_security


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0fd49095
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0fd49095
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0fd49095

Branch: refs/heads/auth-tests-wip
Commit: 0fd490953191f267df316aa0f138e712d9593bdc
Parents: f13ea96
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:12:50 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0fd49095/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 2dfaba4..d1227cd 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "087a1aa9e6972ac6613e2f93177aee56a4bac86c"},
+{fabric,           "fabric",           "d20eafda9045c523f773fbbd06a81d354e1a6ba7"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},


[17/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
docs: Fix typo


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/717ce761
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/717ce761
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/717ce761

Branch: refs/heads/auth-tests-wip
Commit: 717ce761a4f942f02033b638e41b1e3f583f441a
Parents: 7ce9f16
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:18:51 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/717ce761/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 5b96e18..8394e40 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -39,7 +39,7 @@ DepDescs = [
 {couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
 {couch_peruser,    "peruser",          "ff7d190970a46722137fbc7a1a75466e8a544ae1"},
 {couch_tests,       "erlang-tests",    "37b3bfeb4b1a48a592456e67991362e155ed81e0"},
-{docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
+{docs,             "documentation",    "b1bfde4d0af714e6cd8a3a4816cb647e0e3793c9", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
 {fabric,           "fabric",           "2eb1e132e01928a681782c788920c85ce24bfe06"},


[21/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
couch-log-lager: Get lager event handlers from gen_event


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b0141908
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b0141908
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b0141908

Branch: refs/heads/auth-tests-wip
Commit: b0141908a085df9d94c1b3da769ff20ac0104165
Parents: 5ed67f3
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:17:25 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b0141908/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index ca4e7b6..fcf9e0f 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -28,7 +28,7 @@ DepDescs = [
 %% keep these sorted
 {b64url,           "b64url",           "319fc604235ab1fde37047b38a432450161db750"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
-{couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
+{couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
 {couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},


[29/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
factoring out path manipulation into a function


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c5dcb48e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c5dcb48e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c5dcb48e

Branch: refs/heads/auth-tests-wip
Commit: c5dcb48e7973e3157c2ea0acffb2524002b8478f
Parents: a8e250b
Author: Joan Touzet <wo...@apache.org>
Authored: Mon Jun 20 13:29:21 2016 -0400
Committer: Joan Touzet <wo...@apache.org>
Committed: Mon Jun 20 13:29:21 2016 -0400

----------------------------------------------------------------------
 dev/run | 42 +++++++++++++++++-------------------------
 1 file changed, 17 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c5dcb48e/dev/run
----------------------------------------------------------------------
diff --git a/dev/run b/dev/run
index 81140c4..233438d 100755
--- a/dev/run
+++ b/dev/run
@@ -19,8 +19,10 @@ import functools
 import glob
 import inspect
 import json
+import ntpath
 import optparse
 import os
+import posixpath
 import re
 import subprocess as sp
 import sys
@@ -42,6 +44,12 @@ except ImportError:
     import http.client as httpclient
 
 
+def toposixpath(path):
+    if os.sep == ntpath.sep:
+        return path.replace(ntpath.sep, posixpath.sep)
+    else:
+        return path
+
 def log(msg):
     def decorator(func):
         @functools.wraps(func)
@@ -162,23 +170,18 @@ def setup_configs(ctx):
     for idx, node in enumerate(ctx['nodes']):
         cluster_port, backend_port = get_ports(idx + ctx['node_number'])
         env = {
-            "prefix": ctx['rootdir'],
+            "prefix": toposixpath(ctx['rootdir']),
             "package_author_name": "The Apache Software Foundation",
-            "data_dir": ensure_dir_exists(ctx['devdir'],
-                                          "lib", node, "data"),
-            "view_index_dir": ensure_dir_exists(ctx['devdir'],
-                                                "lib", node, "data"),
+            "data_dir": toposixpath(ensure_dir_exists(ctx['devdir'],
+                                          "lib", node, "data")),
+            "view_index_dir": toposixpath(ensure_dir_exists(ctx['devdir'],
+                                                "lib", node, "data")),
             "node_name": "-name %s@127.0.0.1" % node,
             "cluster_port": cluster_port,
             "backend_port": backend_port,
             "fauxton_root": "src/fauxton/dist/release",
             "uuid": "fake_uuid_for_dev"
         }
-        if os.sep == '\\':
-            # Erlang always wants UNIX-style paths
-            env["data_dir"] = env["data_dir"].replace("\\", "/")
-            env["view_index_dir"] = env["view_index_dir"].replace("\\", "/")
-            env["prefix"] = env["prefix"].replace("\\", "/")
         write_config(ctx, node, env)
 
 
@@ -236,10 +239,7 @@ def boot_haproxy(ctx):
 
 def hack_default_ini(ctx, node, content):
     # Replace log file
-    logfile = os.path.join(ctx['devdir'], "logs", "%s.log" % node)
-    if os.sep == '\\':
-        # Erlang always wants UNIX-style paths
-        logfile = logfile.replace("\\", "/")
+    logfile = toposixpath(os.path.join(ctx['devdir'], "logs", "%s.log" % node))
     repl = "file = %s" % logfile
     contents = re.sub("(?m)^file.*$", repl, content)
 
@@ -248,16 +248,10 @@ def hack_default_ini(ctx, node, content):
     mainjs = os.path.join(ctx['rootdir'], "share", "server", "main.js")
     coffeejs = os.path.join(ctx['rootdir'], "share", "server", "main-coffee.js")
 
-    repl = "javascript = %s %s" % (couchjs, mainjs)
-    if os.sep == '\\':
-        # Erlang always wants UNIX-style paths
-        repl = repl.replace("\\", "/")
+    repl = toposixpath("javascript = %s %s" % (couchjs, mainjs))
     contents = re.sub("(?m)^javascript.*$", repl, contents)
 
-    repl = "coffeescript = %s %s" % (couchjs, coffeejs)
-    if os.sep == '\\':
-        # Erlang always wants UNIX-style paths
-        repl = repl.replace("\\", "/")
+    repl = toposixpath("coffeescript = %s %s" % (couchjs, coffeejs))
     contents = re.sub("(?m)^coffeescript.*$", repl, contents)
 
     return contents
@@ -388,9 +382,7 @@ def boot_node(ctx, node):
     ]
     logfname = os.path.join(ctx['devdir'], "logs", "%s.log" % node)
     log = open(logfname, "wb")
-    if os.sep == '\\':
-        # Erlang always wants UNIX-style paths
-        cmd = [x.replace("\\", "/") for x in cmd]
+    cmd = [toposixpath(x) for x in cmd]
     return sp.Popen(cmd, stdin=sp.PIPE, stdout=log, stderr=sp.STDOUT, env=env)
 
 


[07/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Make sure mem3_rep autocreates target shards


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3ad6b4b0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3ad6b4b0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3ad6b4b0

Branch: refs/heads/auth-tests-wip
Commit: 3ad6b4b048b06975d47697c6289b93e52fe58a0a
Parents: ea9bfa9
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:10:10 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3ad6b4b0/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index feca96f..3e26a15 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -30,7 +30,7 @@ DepDescs = [
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
-{couch,            "couch",            "23f188096fb8f8c867f3cda0fa55c30ecce34b10"},
+{couch,            "couch",            "514a447751440ba230e04ea680f446e72e7f04cd"},
 {couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
 {couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
 {couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "c449ab22431658173af45a6599d9875883adb911"},
+{fabric,           "fabric",           "087a1aa9e6972ac6613e2f93177aee56a4bac86c"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},
@@ -52,7 +52,7 @@ DepDescs = [
 {jiffy,            "jiffy",            "ea19c417f9fd52fa3f7ef2d378735e5532c59b29"},
 {khash,            "khash",            "7c6a9cd9776b5c6f063ccafedfa984b00877b019"},
 {mango,            "mango",            "01252f971bef0c8da1d78bf5a7b506b71926ce1b"},
-{mem3,             "mem3",             "861427999a45f34040f13525bd7b2db75c863b26"},
+{mem3,             "mem3",             "386545186e5a31a42fc68c82d0e36f8407bf4739"},
 {mochiweb,         "mochiweb",         "bd6ae7cbb371666a1f68115056f7b30d13765782"},
 {oauth,            "oauth",            "099057a98e41f3aff91e77e3cf496d6c6fd901df"},
 {rexi,             "rexi",             "a327b7dbeb2b0050f7ca9072047bf8ef2d282833"},


[33/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
view_update_seq passes now update_seq works in reduce


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1b38ccd0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1b38ccd0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1b38ccd0

Branch: refs/heads/auth-tests-wip
Commit: 1b38ccd0294ad17d719655612b14b00160168dfd
Parents: e37167d
Author: Robert Newson <rn...@apache.org>
Authored: Wed Jun 22 13:48:49 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Jun 22 13:48:49 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1b38ccd0/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index e071368..1860fce 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "2dda387ea5cc21861d8797ea2c8a82c3b439d55f", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "37bcda9c336bd4d8064a498f84122feeb74abf44"},
+{fabric,           "fabric",           "da85db2dabe371296c54fded76d1de61289f3319"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},


[05/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Set default_security for the tests to everyone


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4d49de6f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4d49de6f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4d49de6f

Branch: refs/heads/auth-tests-wip
Commit: 4d49de6fa9202be439b2ec6256239e9578fa358a
Parents: 2f51996
Author: Eric Avdey <ei...@eiri.ca>
Authored: Wed May 25 12:20:00 2016 -0300
Committer: Eric Avdey <ei...@eiri.ca>
Committed: Wed May 25 12:20:00 2016 -0300

----------------------------------------------------------------------
 rel/files/eunit.ini | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4d49de6f/rel/files/eunit.ini
----------------------------------------------------------------------
diff --git a/rel/files/eunit.ini b/rel/files/eunit.ini
index e3f96c3..b1303b9 100644
--- a/rel/files/eunit.ini
+++ b/rel/files/eunit.ini
@@ -18,6 +18,7 @@
 [couchdb]
 ; time to relax!
 uuid = 74696d6520746f2072656c617821
+default_security = everyone
 
 [httpd]
 port = 0


[18/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
b64url: Update .travis.yml


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7ce9f16e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7ce9f16e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7ce9f16e

Branch: refs/heads/auth-tests-wip
Commit: 7ce9f16e13861074e4b212cd69e44029eef942f9
Parents: b014190
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:18:11 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7ce9f16e/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index fcf9e0f..5b96e18 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -26,7 +26,7 @@ DepDescs = [
 {couch_epi,        "couch-epi",        "5a7f2868c720bc428e6c888dc61d988b9a5f63f1"},
 {config,           "config",           "60977f81dc06af4a3d1e89891b3061ed4cd01e95"},
 %% keep these sorted
-{b64url,           "b64url",           "319fc604235ab1fde37047b38a432450161db750"},
+{b64url,           "b64url",           "6895652d80f95cdf04efb14625abed868998f174"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},


[44/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
auth-tests wip

*Get cookie-auth to pass \o/*

Current remaining issues are with users_db.js and users_db_security.js.

./dev/run -n1 --with-admin-party-please

Second terminal:
./tests/javascript/run users_db

or

./tests/javascript/run users_db_security

* * *

users_db.js:

JS test output:

test/javascript/tests/users_db.js
    Error: function_clause
Trace back (most recent call first):

 546: test/javascript/couch.js
      CouchError([object Object])
 509: test/javascript/couch.js
      ([object CouchHTTP])
  58: test/javascript/couch.js
      ([object Object])
  71: test/javascript/tests/users_db.js # <<<<< place in users_db.js where the error is triggered
      testFun()
 385: test/javascript/couch_test_runner.js
      run_on_modified_server([object Array],testFun)
 181: test/javascript/tests/users_db.js
      ()
  37: test/javascript/cli_runner.js
      runTest()
  48: test/javascript/cli_runner.js

fail

dev/logs/node1.log:

2016-05-16 14:34:31.903 [error] node1@127.0.0.1 <0.682.0> req_err(2080506428) unknown_error : function_clause[<<"chttpd_db:update_doc/4 L970">>,<<"chttpd_db:send_updated_doc/6 L934">>,<<"chttpd:process_request/1 L293">>,<<"chttpd:handle_request_int/1 L229">>,<<"mochiweb_http:headers/6 L122">>,<<"proc_lib:init_p_do_apply/3 L239">>]

* * *

users_db_security.js:

JS test output:

    Error: expected 'true', got 'null'
Trace back (most recent call first):

  52: test/javascript/test_setup.js
      T(false,"expected 'true', got 'null'",(void 0))
 321: test/javascript/couch_test_runner.js
      TEquals(true,(void 0))
 186: test/javascript/tests/users_db_security.js  # <<<<< place in users_db_security.js where
      ()                                          #       the error is triggered
 385: test/javascript/couch_test_runner.js
      run_on_modified_server([object Array],(function () {var res = usersDb.
 114: test/javascript/tests/users_db_security.js
      ()
 385: test/javascript/couch_test_runner.js
      run_on_modified_server([object Array],(function () {var userDoc = {_id
 419: test/javascript/tests/users_db_security.js
      ()
  37: test/javascript/cli_runner.js
      runTest()
  48: test/javascript/cli_runner.js

dev/logs/node1.log:

2016-05-16 19:46:20.092 [error] Undefined emulator Error in process <0.1938.0> on node 'node1@127.0.0.1' with exit value: {function_clause,[{fabric_doc_update,handle_message,[not_found,{shard,<<42 bytes>>,'node1@127.0.0.1',<<6 bytes>>,[3221225472,3758096383],#Ref<0.0.0.40541>},{1,1,1,[{{shard,<<42 bytes>>,'node1@127.0.0.1',<<6 bytes>>,[3221225472,3758096383],#Ref<0.0.0.40541>},[{doc,<<24 bytes>>,{1,[<<16 bytes>>]},{[{<<4 bytes>>,<<4 bytes>>},{<<4 bytes>>,<<7 bytes>>},{<<4 bytes>>,<<32 bytes>>},{<<5 bytes>>,[]},{<<15 bytes>>,<<6 bytes>>},{<<10 bytes>>,1},{<<11 bytes>>,<<40 bytes>>}]},[],false,[{ref,#Ref<0.0.0.40540>}]}]}],{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],...

2016-05-16 19:46:20.093 [error] node1@127.0.0.1 <0.1602.0> req_err(1320117845) badmatch : {function_clause,
    [{fabric_doc_update,handle_message,
         [not_found,
          {shard,<<"shards/c0000000-dfffffff/_users.1463420709">>,
              'node1@127.0.0.1',<<"_users">>,
              [3221225472,3758096383],
              #Ref<0.0.0.40541>},
          {1,1,1,
           [{{shard,<<"shards/c0000000-dfffffff/_users.1463420709">>,
                 'node1@127.0.0.1',<<"_users">>,
                 [3221225472,3758096383],
                 #Ref<0.0.0.40541>},
             [{doc,<<"org.couchdb.user:rnewson">>,
                  {1,
                   [<<160,186,22,20,84,62,68,165,50,104,255,197,135,68,137,
                      132>>]},
                  {[{<<"type">>,<<"user">>},
                    {<<"name">>,<<"rnewson">>},
                    {<<"salt">>,<<"455064159003b44956d0deeab778ba77">>},
                    {<<"roles">>,[]},
                    {<<"password_scheme">>,<<"pbkdf2">>},
                    {<<"iterations">>,1},
                    {<<"derived_key">>,
                     <<"dcfaca803d9fcd53c7882beccddb074760d7da5f">>}]},
                  [],false,
                  [{ref,#Ref<0.0.0.40540>}]}]}],
           {dict,0,16,16,8,80,48,
               {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
               {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}}],
         [{file,"src/fabric_doc_update.erl"},{line,55}]},
     {rexi_utils,process_mailbox,6,[{file,"src/rexi_utils.erl"},{line,55}]},
     {fabric_doc_update,go,3,[{file,"src/fabric_doc_update.erl"},{line,39}]},
     {fabric,update_docs,3,[{file,"src/fabric.erl"},{line,245}]},
     {fabric,update_doc,3,[{file,"src/fabric.erl"},{line,225}]},
     {chttpd_auth_cache,'-update_user_creds/3-fun-0-',1,
         [{file,"src/chttpd_auth_cache.erl"},{line,55}]}]}
    [<<"couch_httpd_auth:maybe_upgrade_password_hash/6 L408">>,<<"couch_httpd_auth:handle_session_req/2 L311">>,<<"chttpd:process_request/1 L293">>,<<"chttpd:handle_request_int/1 L229">>,<<"mochiweb_http:headers/6 L122">>,<<"proc_lib:init_p_do_apply/3 L239">>]
2016-05-16 19:46:20.093 [notice] node1@127.0.0.1 <0.1602.0> fa720ffc9c 127.0.0.1 127.0.0.1:15984 undefined POST /_session 500 ok 2

Applying https://github.com/apache/couchdb-mem3/pull/21 makes no difference.

* * *


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6411a404
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6411a404
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6411a404

Branch: refs/heads/auth-tests-wip
Commit: 6411a40494f0e8f59a8852c17a7d9692b2a19ad9
Parents: 01be91c
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon May 16 19:30:19 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:58 2016 +0200

----------------------------------------------------------------------
 test/javascript/couch.js                   |  2 +-
 test/javascript/couch_test_runner.js       |  7 +++++
 test/javascript/tests/cookie_auth.js       | 35 +++++++++++--------------
 test/javascript/tests/users_db.js          | 22 +++++++++++-----
 test/javascript/tests/users_db_security.js | 31 +++++++++++-----------
 5 files changed, 54 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6411a404/test/javascript/couch.js
----------------------------------------------------------------------
diff --git a/test/javascript/couch.js b/test/javascript/couch.js
index 1a2f950..dd9a408 100644
--- a/test/javascript/couch.js
+++ b/test/javascript/couch.js
@@ -470,7 +470,7 @@ CouchDB.requestStats = function(path, test) {
     query_arg = "?flush=true";
   }
 
-  var url = "/_stats/" + path.join("/") + query_arg;
+  var url = "/_node/node1@127.0.0.1/_stats/" + path.join("/") + query_arg;
   var stat = CouchDB.request("GET", url).responseText;
   return JSON.parse(stat);
 };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6411a404/test/javascript/couch_test_runner.js
----------------------------------------------------------------------
diff --git a/test/javascript/couch_test_runner.js b/test/javascript/couch_test_runner.js
index 887e988..253b545 100644
--- a/test/javascript/couch_test_runner.js
+++ b/test/javascript/couch_test_runner.js
@@ -507,3 +507,10 @@ function retry_part(fct, n, duration) {
   }
 }
 
+function wait(ms) {
+  var t0 = new Date(), t1;
+  do {
+    CouchDB.request("GET", "/");
+    t1 = new Date();
+  } while ((t1 - t0) <= ms);
+}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6411a404/test/javascript/tests/cookie_auth.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/cookie_auth.js b/test/javascript/tests/cookie_auth.js
index df4c9bd..9a14416 100644
--- a/test/javascript/tests/cookie_auth.js
+++ b/test/javascript/tests/cookie_auth.js
@@ -11,18 +11,17 @@
 // the License.
 
 couchTests.cookie_auth = function(debug) {
-  return console.log('TODO: config not available on cluster');
   // This tests cookie-based authentication.
-  //return console.log('TODO');
-  // TODO: re-write so we get along withOUT changed config
-  // poss.: re-write so we just use _users and add some docs (and we delete those b4 running). Admin party should not hurt when logging in more
 
   var db_name = get_random_db_name();
   var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
   db.createDb();
 
   // used later, needs to be global here
-  var users_db_name = get_random_db_name();
+  var users_db_name = '_users';
+  var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
+  try { usersDb.createDb(); } catch (e) { /* ignore if exists*/ }
+
   if (debug) debugger;
 
   var password = "3.141592653589";
@@ -90,13 +89,13 @@ couchTests.cookie_auth = function(debug) {
       TEquals("Jason Davies", checkDoc.name);
 
       var jchrisUserDoc = CouchDB.prepareUserDoc({
-        name: "jchris@apache.org"
+        name: "jchris"
       }, "funnybone");
       T(usersDb.save(jchrisUserDoc).ok);
 
       // make sure we cant create duplicate users
       var duplicateJchrisDoc = CouchDB.prepareUserDoc({
-        name: "jchris@apache.org"
+        name: "jchris"
       }, "eh, Boo-Boo?");
 
       try {
@@ -194,8 +193,8 @@ couchTests.cookie_auth = function(debug) {
       // test users db validations
       //
       // test that you can't update docs unless you are logged in as the user (or are admin)
-      T(CouchDB.login("jchris@apache.org", "funnybone").ok);
-      T(CouchDB.session().userCtx.name == "jchris@apache.org");
+      T(CouchDB.login("jchris", "funnybone").ok);
+      T(CouchDB.session().userCtx.name == "jchris");
       T(CouchDB.session().userCtx.roles.length == 0);
 
       jasonUserDoc.foo=3;
@@ -223,6 +222,7 @@ couchTests.cookie_auth = function(debug) {
 
       jchrisUserDoc.foo = ["foo"];
       T(save_as(usersDb, jchrisUserDoc, "jan"));
+      wait(5000) // wait for auth cache invalidation
 
       // test that you can't save system (underscore) roles even if you are admin
       jchrisUserDoc.roles = ["_bar"];
@@ -232,8 +232,8 @@ couchTests.cookie_auth = function(debug) {
       T(usersDb.last_req.status == 403);
 
       // make sure the foo role has been applied
-      T(CouchDB.login("jchris@apache.org", "funnybone").ok);
-      T(CouchDB.session().userCtx.name == "jchris@apache.org");
+      T(CouchDB.login("jchris", "funnybone").ok);
+      T(CouchDB.session().userCtx.name == "jchris");
       T(CouchDB.session().userCtx.roles.indexOf("_admin") == -1);
       T(CouchDB.session().userCtx.roles.indexOf("foo") != -1);
 
@@ -245,9 +245,9 @@ couchTests.cookie_auth = function(debug) {
 
       TEquals(true, CouchDB.login("jan", "apple").ok);
       run_on_modified_server([{section: "admins",
-        key: "jchris@apache.org", value: "funnybone"}], function() {
-          T(CouchDB.login("jchris@apache.org", "funnybone").ok);
-          T(CouchDB.session().userCtx.name == "jchris@apache.org");
+        key: "jchris", value: "funnybone"}], function() {
+          T(CouchDB.login("jchris", "funnybone").ok);
+          T(CouchDB.session().userCtx.name == "jchris");
           T(CouchDB.session().userCtx.roles.indexOf("_admin") != -1);
           // test that jchris still has the foo role
           T(CouchDB.session().userCtx.roles.indexOf("foo") != -1);
@@ -258,9 +258,9 @@ couchTests.cookie_auth = function(debug) {
           delete jchrisUserDoc.password_sha;
           T(usersDb.save(jchrisUserDoc).ok);
           T(CouchDB.logout().ok);
-          T(CouchDB.login("jchris@apache.org", "funnybone").ok);
+          T(CouchDB.login("jchris", "funnybone").ok);
           var s = CouchDB.session();
-          T(s.userCtx.name == "jchris@apache.org");
+          T(s.userCtx.name == "jchris");
           T(s.userCtx.roles.indexOf("_admin") != -1);
           // test session info
           T(s.info.authenticated == "cookie");
@@ -277,9 +277,6 @@ couchTests.cookie_auth = function(debug) {
     TEquals(true, CouchDB.login("jan", "apple").ok);
   };
 
-  var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
-  usersDb.createDb();
-
   run_on_modified_server(
     [
      {section: "couch_httpd_auth",

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6411a404/test/javascript/tests/users_db.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index ada0047..7027b07 100644
--- a/test/javascript/tests/users_db.js
+++ b/test/javascript/tests/users_db.js
@@ -15,8 +15,9 @@ couchTests.users_db = function(debug) {
   // This tests the users db, especially validations
   // this should also test that you can log into the couch
   
-  var users_db_name = '_users'; //get_random_db_name();
+  var users_db_name = '_users';
   var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
+  try { usersDb.createDb(); } catch (e) { /* ignore if exists*/ }
 
   // test that you can treat "_user" as a db-name
   // this can complicate people who try to secure the users db with 
@@ -32,8 +33,8 @@ couchTests.users_db = function(debug) {
     // since it doesn\u2019t wait for the ddoc to be created.
     // in a full test suite run, this is fine.
     // dev trick: run `test/javascript/run basics users_db`
-    var ddoc = usersDb.open("_design/_auth");
-    T(ddoc.validate_doc_update);
+    // var ddoc = usersDb.open("_design/_auth");
+    // T(ddoc.validate_doc_update);
     
     // test that you can login as a user using basic auth
     var jchrisUserDoc = CouchDB.prepareUserDoc({
@@ -60,14 +61,14 @@ couchTests.users_db = function(debug) {
       }
     });
     T(s.name == null);
-    T(s.info.authenticated == "default");
+    T(s.info.authenticated == "local");
     
     
     // ok, now create a conflicting edit on the jchris doc, and make sure there's no login.
     var jchrisUser2 = JSON.parse(JSON.stringify(jchrisUserDoc));
     jchrisUser2.foo = "bar";
-    var r = usersDb.save(jchrisUser2)
-    T(r.ok);
+
+    T(usersDb.save(jchrisUser2).ok);
     try {
       usersDb.save(jchrisUserDoc);
       T(false && "should be an update conflict");
@@ -80,6 +81,7 @@ couchTests.users_db = function(debug) {
 
     var jchrisWithConflict = usersDb.open(jchrisUserDoc._id, {conflicts : true});
     T(jchrisWithConflict._conflicts.length == 1);
+    wait(5000) // wait for auth_cache invalidation
 
     // no login with conflicted user doc
     try {
@@ -171,7 +173,13 @@ couchTests.users_db = function(debug) {
 
   };
 
-  testFun()
+  run_on_modified_server(
+    [{section: "couch_httpd_auth",
+      key: "iterations", value: "1"},
+     {section: "admins",
+      key: "jan", value: "apple"}],
+    testFun
+  );
   usersDb.deleteDb(); // cleanup
   
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6411a404/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index 2c606a1..355bb03 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -11,18 +11,11 @@
 // the License.
 
 couchTests.users_db_security = function(debug) {
-  return console.log('TODO after at least COUCHDB-2991 is adressed');
-  var db_name = get_random_db_name();
+  var db_name = '_users';
   var usersDb = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
-  if (debug) debugger;
+  try { usersDb.createDb(); } catch (e) { /* ignore if exists*/ }
 
-  function wait(ms) {
-    var t0 = new Date(), t1;
-    do {
-      CouchDB.request("GET", "/");
-      t1 = new Date();
-    } while ((t1 - t0) <= ms);
-  }
+  if (debug) debugger;
 
   var loginUser = function(username) {
     var pws = {
@@ -32,6 +25,9 @@ couchTests.users_db_security = function(debug) {
       fdmanana: "foobar",
       benoitc: "test"
     };
+    // we are changing jchris\u2019s password further down
+    // the next two lines keep the code cleaner in
+    // the actual tests
     var username1 = username.replace(/[0-9]$/, "");
     var password = pws[username];
     T(CouchDB.login(username1, pws[username]).ok);
@@ -98,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");
-    userDoc = usersDb.open("org.couchdb.user:jchris");
+    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");
     TEquals(32, userDoc.salt.length, "salt should exist");
@@ -141,7 +137,7 @@ couchTests.users_db_security = function(debug) {
       jchrisDoc.password = "couch";
 
       TEquals(true, save_as(usersDb, jchrisDoc, "jchris").ok);
-      wait(100);
+      wait(5000);
       var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1");
 
       TEquals(undefined, jchrisDoc.password, "password field should be null 2");
@@ -184,8 +180,11 @@ couchTests.users_db_security = function(debug) {
       T(!rnewsonDoc.derived_key);
       T(!rnewsonDoc.iterations);
 
-      TEquals(true, CouchDB.login("rnewson", "plaintext_password").ok);
-      rnewsonDoc = usersDb.open(rnewsonDoc._id);
+      wait(5000); // wait for auth cache invalidation
+      var r = CouchDB.login("rnewson", "plaintext_password")
+      log(r)
+      TEquals(true, r.ok);
+      rnewsonDoc = open_as(usersDb, rnewsonDoc._id, "rnewson");
       TEquals("pbkdf2", rnewsonDoc.password_scheme);
       T(rnewsonDoc.salt != salt);
       T(!rnewsonDoc.password_sha);
@@ -415,8 +414,8 @@ couchTests.users_db_security = function(debug) {
   run_on_modified_server(
     [{section: "couch_httpd_auth",
       key: "iterations", value: "1"},
-     {section: "couch_httpd_auth",
-      key: "authentication_db", value: usersDb.name}],
+   {section: "admins",
+    key: "jan", value: "apple"}],
     testFun
   );
   usersDb.deleteDb(); // cleanup


[37/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
update chttpd


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/af9513fa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/af9513fa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/af9513fa

Branch: refs/heads/auth-tests-wip
Commit: af9513fa8839bce97572e2dac11251761c46105e
Parents: 9f0d22f
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Thu Jun 30 11:04:36 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Thu Jun 30 11:04:36 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/af9513fa/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index bb84945..049a46b 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -29,7 +29,7 @@ DepDescs = [
 {b64url,           "b64url",           "6895652d80f95cdf04efb14625abed868998f174"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
-{chttpd,           "chttpd",           "21be898160793be392288b41230fe0ac74255c23"},
+{chttpd,           "chttpd",           "b468c7de32c601bd2710b04ff71cecb8d3f0540f"},
 {couch,            "couch",            "411c130ea63c3423d7ea71743095dfb446680da6"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "cfc354989a28865ec83efc0f745e91b8c6a3a6c3"},


[31/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
update dependencies


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e8b49c9e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e8b49c9e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e8b49c9e

Branch: refs/heads/auth-tests-wip
Commit: e8b49c9ea87348276904f7cc5f26262e31715761
Parents: 3f1b0c4
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jun 21 17:22:54 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jun 21 17:23:32 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e8b49c9e/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index d5cf95e..5c2af09 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -30,19 +30,19 @@ DepDescs = [
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
 {chttpd,           "chttpd",           "21be898160793be392288b41230fe0ac74255c23"},
-{couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
+{couch,            "couch",            "411c130ea63c3423d7ea71743095dfb446680da6"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
-{couch_mrview,     "couch-mrview",     "d07771ac4255d3b217a993e807f1e9620b38dbee"},
+{couch_mrview,     "couch-mrview",     "cfc354989a28865ec83efc0f745e91b8c6a3a6c3"},
 {couch_replicator, "couch-replicator", "8629fb2690e4d11ecc0ad15ef032d3f109a93285"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
 {couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},
 {couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
 {couch_peruser,    "peruser",          "ff7d190970a46722137fbc7a1a75466e8a544ae1"},
 {couch_tests,       "erlang-tests",    "37b3bfeb4b1a48a592456e67991362e155ed81e0"},
-{docs,             "documentation",    "b1bfde4d0af714e6cd8a3a4816cb647e0e3793c9", [raw]},
+{docs,             "documentation",    "2dda387ea5cc21861d8797ea2c8a82c3b439d55f", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "2eb1e132e01928a681782c788920c85ce24bfe06"},
+{fabric,           "fabric",           "18e6fd852e7442ad957950daaaa7ee11d49255ea"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},


[19/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fabric: Fix fabric_doc_open_revs


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a3a39fc7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a3a39fc7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a3a39fc7

Branch: refs/heads/auth-tests-wip
Commit: a3a39fc77af87e69f87a330d48b8bd06a76df592
Parents: 0fd4909
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:13:52 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a3a39fc7/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index d1227cd..4ccc52d 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "d20eafda9045c523f773fbbd06a81d354e1a6ba7"},
+{fabric,           "fabric",           "475b90ccd104a1d2598a21338f02c433a10d62a7"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},


[25/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
ensure _replicator VDU is updated


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/514d95e0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/514d95e0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/514d95e0

Branch: refs/heads/auth-tests-wip
Commit: 514d95e00b0aaf69d9e640958e9f8b1af6ccf639
Parents: c2474ee
Author: Robert Newson <rn...@apache.org>
Authored: Thu Jun 9 19:57:14 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jun 9 19:57:31 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/514d95e0/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 774490f..d2cfc66 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -33,7 +33,7 @@ DepDescs = [
 {couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "d07771ac4255d3b217a993e807f1e9620b38dbee"},
-{couch_replicator, "couch-replicator", "8697441137d635fbd6490692cb075912b36c7239"},
+{couch_replicator, "couch-replicator", "8629fb2690e4d11ecc0ad15ef032d3f109a93285"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
 {couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},
 {couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},


[06/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge remote branch 'relax-eunit-default-security'

This closes #421

Signed-off-by: Eric Avdey <ei...@eiri.ca>


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e24a18bb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e24a18bb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e24a18bb

Branch: refs/heads/auth-tests-wip
Commit: e24a18bb632a60ecbd6f8e767db402562a973f59
Parents: 2f51996 4d49de6
Author: Eric Avdey <ei...@eiri.ca>
Authored: Wed May 25 12:31:40 2016 -0300
Committer: Eric Avdey <ei...@eiri.ca>
Committed: Wed May 25 12:32:41 2016 -0300

----------------------------------------------------------------------
 rel/files/eunit.ini | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[41/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Update Rebar.Config for Fauxton to 1.1.5 release


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3bc67cb5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3bc67cb5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3bc67cb5

Branch: refs/heads/auth-tests-wip
Commit: 3bc67cb517fe973b1ff3764182503c68200bcde0
Parents: 116aca8
Author: michellephung <mi...@gmail.com>
Authored: Tue Jul 5 07:08:22 2016 -0400
Committer: michellephung <mi...@gmail.com>
Committed: Tue Jul 5 07:11:44 2016 -0400

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3bc67cb5/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 049a46b..295edc2 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -43,7 +43,7 @@ DepDescs = [
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
 {fabric,           "fabric",           "aa17ddf3c149a7ac5316e5c821d0d704ac857960"},
-{fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
+{fauxton,          "fauxton",          {tag, "v1.1.5"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},
 {goldrush,         "goldrush",         {tag, "0.1.6"}},


[28/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Check for platform path separator instead of OS check


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a8e250b8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a8e250b8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a8e250b8

Branch: refs/heads/auth-tests-wip
Commit: a8e250b8e9983e61d5f881575410c7a0de9fb7b2
Parents: 03bbe21
Author: Joan Touzet <wo...@apache.org>
Authored: Mon Jun 20 01:55:58 2016 -0400
Committer: Joan Touzet <wo...@apache.org>
Committed: Mon Jun 20 01:55:58 2016 -0400

----------------------------------------------------------------------
 dev/run | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a8e250b8/dev/run
----------------------------------------------------------------------
diff --git a/dev/run b/dev/run
index 81398d0..81140c4 100755
--- a/dev/run
+++ b/dev/run
@@ -174,7 +174,7 @@ def setup_configs(ctx):
             "fauxton_root": "src/fauxton/dist/release",
             "uuid": "fake_uuid_for_dev"
         }
-        if os.name == 'nt':
+        if os.sep == '\\':
             # Erlang always wants UNIX-style paths
             env["data_dir"] = env["data_dir"].replace("\\", "/")
             env["view_index_dir"] = env["view_index_dir"].replace("\\", "/")
@@ -237,7 +237,7 @@ def boot_haproxy(ctx):
 def hack_default_ini(ctx, node, content):
     # Replace log file
     logfile = os.path.join(ctx['devdir'], "logs", "%s.log" % node)
-    if os.name == 'nt':
+    if os.sep == '\\':
         # Erlang always wants UNIX-style paths
         logfile = logfile.replace("\\", "/")
     repl = "file = %s" % logfile
@@ -249,13 +249,13 @@ def hack_default_ini(ctx, node, content):
     coffeejs = os.path.join(ctx['rootdir'], "share", "server", "main-coffee.js")
 
     repl = "javascript = %s %s" % (couchjs, mainjs)
-    if os.name == 'nt':
+    if os.sep == '\\':
         # Erlang always wants UNIX-style paths
         repl = repl.replace("\\", "/")
     contents = re.sub("(?m)^javascript.*$", repl, contents)
 
     repl = "coffeescript = %s %s" % (couchjs, coffeejs)
-    if os.name == 'nt':
+    if os.sep == '\\':
         # Erlang always wants UNIX-style paths
         repl = repl.replace("\\", "/")
     contents = re.sub("(?m)^coffeescript.*$", repl, contents)
@@ -388,7 +388,7 @@ def boot_node(ctx, node):
     ]
     logfname = os.path.join(ctx['devdir'], "logs", "%s.log" % node)
     log = open(logfname, "wb")
-    if os.name == 'nt':
+    if os.sep == '\\':
         # Erlang always wants UNIX-style paths
         cmd = [x.replace("\\", "/") for x in cmd]
     return sp.Popen(cmd, stdin=sp.PIPE, stdout=log, stderr=sp.STDOUT, env=env)


[22/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fabric: Fix race in tests


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5ed67f3f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5ed67f3f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5ed67f3f

Branch: refs/heads/auth-tests-wip
Commit: 5ed67f3fcc6ccbef181cea3d9d1d86721e1ac14a
Parents: a3a39fc
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:14:34 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5ed67f3f/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 4ccc52d..ca4e7b6 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "475b90ccd104a1d2598a21338f02c433a10d62a7"},
+{fabric,           "fabric",           "2eb1e132e01928a681782c788920c85ce24bfe06"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},


[39/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fix attachments.js test


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/638b5cb5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/638b5cb5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/638b5cb5

Branch: refs/heads/auth-tests-wip
Commit: 638b5cb5d0f8a5527acffc9d1d2a0d8e6410e0ef
Parents: 0fef309
Author: Robert Newson <rn...@apache.org>
Authored: Mon Jul 4 14:29:45 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Mon Jul 4 15:00:40 2016 +0100

----------------------------------------------------------------------
 test/javascript/tests/attachments.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/638b5cb5/test/javascript/tests/attachments.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/attachments.js b/test/javascript/tests/attachments.js
index b3b2e2f..1baea65 100644
--- a/test/javascript/tests/attachments.js
+++ b/test/javascript/tests/attachments.js
@@ -217,7 +217,10 @@ couchTests.attachments= function(debug) {
 */
 
   // test large attachments - COUCHDB-366
-  var lorem = CouchDB.request("GET", "http://localhost:15984/_utils/test/lorem.txt").responseText;
+  var lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '
+  for (var i=0; i<64; i++) {
+    lorem = lorem + lorem;
+  }
   var xhr = CouchDB.request("PUT", "/" + db_name + "/bin_doc5/lorem.txt", {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
     body:lorem
@@ -230,8 +233,10 @@ couchTests.attachments= function(debug) {
   TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // test large inline attachment too
-  var lorem_b64 = CouchDB.request("GET", "http://localhost:15984/_utils/test/lorem_b64.txt");
-  lorem_b64 = lorem_b64.responseText;
+  var lorem_b64 = 'TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4g'
+  for (var i=0; i<64; i++) {
+    lorem_b64 = lorem_b64 + lorem_b64;
+  }
   var doc = db.open("bin_doc5", {attachments:true});
   TEquals(lorem_b64, doc._attachments["lorem.txt"].data, 'binary attachment data should match');
 


[15/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
couch: Set default_security for oauth tests to everyone


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f13ea964
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f13ea964
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f13ea964

Branch: refs/heads/auth-tests-wip
Commit: f13ea96482af0c884ca0a2f139c687065a3da199
Parents: 3ad6b4b
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:11:21 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f13ea964/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 3e26a15..2dfaba4 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -30,7 +30,7 @@ DepDescs = [
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
-{couch,            "couch",            "514a447751440ba230e04ea680f446e72e7f04cd"},
+{couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
 {couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
 {couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
 {couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},


[24/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
update couch_index (closes COUCHDB-3028)


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c2474ee9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c2474ee9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c2474ee9

Branch: refs/heads/auth-tests-wip
Commit: c2474ee98b317e59cac27d9d43518b893e33c1c0
Parents: 1e25dc1
Author: Robert Newson <rn...@apache.org>
Authored: Thu Jun 9 19:18:38 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jun 9 19:18:38 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2474ee9/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index ee7250c..774490f 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -31,7 +31,7 @@ DepDescs = [
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
-{couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
+{couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "d07771ac4255d3b217a993e807f1e9620b38dbee"},
 {couch_replicator, "couch-replicator", "8697441137d635fbd6490692cb075912b36c7239"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},


[32/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
support update_seq in _all_docs

Tests improved but don't pass, bulkSave seems async.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e37167db
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e37167db
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e37167db

Branch: refs/heads/auth-tests-wip
Commit: e37167dbbd33e9c86bb02b09783660dcbdf6cae6
Parents: e8b49c9
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jun 21 21:18:03 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jun 21 22:16:59 2016 +0100

----------------------------------------------------------------------
 rebar.config.script                      |  2 +-
 test/javascript/tests/view_update_seq.js | 34 +++++++++++++++++----------
 2 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e37167db/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 5c2af09..e071368 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "2dda387ea5cc21861d8797ea2c8a82c3b439d55f", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "18e6fd852e7442ad957950daaaa7ee11d49255ea"},
+{fabric,           "fabric",           "37bcda9c336bd4d8064a498f84122feeb74abf44"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},

http://git-wip-us.apache.org/repos/asf/couchdb/blob/e37167db/test/javascript/tests/view_update_seq.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/view_update_seq.js b/test/javascript/tests/view_update_seq.js
index 3012014..a74b08d 100644
--- a/test/javascript/tests/view_update_seq.js
+++ b/test/javascript/tests/view_update_seq.js
@@ -11,7 +11,6 @@
 // the License.
 
 couchTests.view_update_seq = function(debug) {
-  return console.log("TODO: update_seq for _all_docs not implemented yet");
   var db_name = get_random_db_name();
   var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
   db.createDb();
@@ -37,14 +36,23 @@ couchTests.view_update_seq = function(debug) {
       }
     }
   };
+
+  var seqInt = function(val) {
+    if (typeof(val) === 'string') {
+      return parseInt(val.split('-')[0]);
+    } else {
+      return val;
+    }
+  };
+
   T(db.save(designDoc).ok);
 
-  T(db.info().update_seq == 1);
+  TEquals(1, seqInt(db.info().update_seq));
 
   resp = db.allDocs({update_seq:true});
 
   T(resp.rows.length == 1);
-  T(resp.update_seq == 1);
+  TEquals(1, seqInt(resp.update_seq));
 
   var docs = makeDocs(0, 100);
   db.bulkSave(docs);
@@ -55,11 +63,11 @@ couchTests.view_update_seq = function(debug) {
 
   resp = db.allDocs({limit: 1, update_seq:true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 101);
+  TEquals(101, seqInt(resp.update_seq));
 
   resp = db.view('test/all_docs', {limit: 1, update_seq:true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 101);
+  TEquals(101, seqInt(resp.update_seq));
 
   resp = db.view('test/all_docs', {limit: 1, update_seq:false});
   T(resp.rows.length == 1);
@@ -67,18 +75,18 @@ couchTests.view_update_seq = function(debug) {
 
   resp = db.view('test/summate', {update_seq:true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 101);
+  TEquals(101, seqInt(resp.update_seq));
 
   db.save({"id":"0", "integer": 1});
   resp = db.view('test/all_docs', {limit: 1,stale: "ok", update_seq:true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 101);
+  TEquals(101, seqInt(resp.update_seq));
 
   db.save({"id":"00", "integer": 2});
   resp = db.view('test/all_docs',
     {limit: 1, stale: "update_after", update_seq: true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 101);
+  TEquals(101, seqInt(resp.update_seq));
 
   // wait 5 seconds for the next assertions to pass in very slow machines
   var t0 = new Date(), t1;
@@ -89,20 +97,20 @@ couchTests.view_update_seq = function(debug) {
 
   resp = db.view('test/all_docs', {limit: 1, stale: "ok", update_seq: true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 103);
+  TEquals(103, seqInt(resp.update_seq));
 
   resp = db.view('test/all_docs', {limit: 1, update_seq:true});
   T(resp.rows.length == 1);
-  T(resp.update_seq == 103);
+  TEquals(103, seqInt(resp.update_seq));
 
   resp = db.view('test/all_docs',{update_seq:true},["0","1"]);
-  T(resp.update_seq == 103);
+  TEquals(103, seqInt(resp.update_seq));
 
   resp = db.view('test/all_docs',{update_seq:true},["0","1"]);
-  T(resp.update_seq == 103);
+  TEquals(103, seqInt(resp.update_seq));
 
   resp = db.view('test/summate',{group:true, update_seq:true},[0,1]);
-  TEquals(103, resp.update_seq);
+  TEquals(103, seqInt(resp.update_seq));
 
   // cleanup
   db.deleteDb();


[09/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
fabric: Fix monitors in fabric_db_update_listener


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f069ffea
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f069ffea
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f069ffea

Branch: refs/heads/auth-tests-wip
Commit: f069ffea526f10604c7676eaf6c69a01dbf22113
Parents: 2b1d801
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:06:01 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f069ffea/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 606ddf5..0068539 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "089f404d26374d8c6942a725d05627d6901a9330", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "ecaacfecf0e356d84ca2978346ba409107df064e"},
+{fabric,           "fabric",           "f0d6c03e425473e784fbb815f48f1cca606f91f1"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},


[13/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
global-changes: enable feed=eventsource for /_db_updates


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f65cf4cf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f65cf4cf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f65cf4cf

Branch: refs/heads/auth-tests-wip
Commit: f65cf4cf96d0604cea850030c04381256cd7adfc
Parents: 717ce76
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:20:07 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f65cf4cf/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 8394e40..0c60af8 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -45,7 +45,7 @@ DepDescs = [
 {fabric,           "fabric",           "2eb1e132e01928a681782c788920c85ce24bfe06"},
 {fauxton,          "fauxton",          {tag, "v1.1.2"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
-{global_changes,   "global-changes",   "e55de37ece29b6cbc0af540370d2425159338bf9"},
+{global_changes,   "global-changes",   "40e88fc7b95017270400e4fa78c3357f125fb0f0"},
 {goldrush,         "goldrush",         {tag, "0.1.6"}},
 {ibrowse,          "ibrowse",          "4af2d408607874d124414ac45df1edbe3961d1cd"},
 {ioq,              "ioq",              "c7c75ebeaf41599e3a3e211097d864f0e7785829"},


[04/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge remote branch 'cloudant:65501-disable-recompaction'

This closes #419

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2f51996d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2f51996d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2f51996d

Branch: refs/heads/auth-tests-wip
Commit: 2f51996d4b46a8e6ae3d25b68fe1ea69dab6d006
Parents: d074b5c fc091fd
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Tue May 24 15:49:53 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Tue May 24 15:49:53 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[27/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Use UNIX-style paths for view servers on Windows


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/03bbe213
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/03bbe213
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/03bbe213

Branch: refs/heads/auth-tests-wip
Commit: 03bbe213ef49cb8f2bfac190257f0cbe9b1d5f54
Parents: 5e8041e
Author: Joan Touzet <wo...@atypical.net>
Authored: Fri Jun 17 19:12:41 2016 -0400
Committer: Joan Touzet <wo...@atypical.net>
Committed: Fri Jun 17 19:12:41 2016 -0400

----------------------------------------------------------------------
 dev/run | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/03bbe213/dev/run
----------------------------------------------------------------------
diff --git a/dev/run b/dev/run
index 8f2164e..81398d0 100755
--- a/dev/run
+++ b/dev/run
@@ -249,9 +249,15 @@ def hack_default_ini(ctx, node, content):
     coffeejs = os.path.join(ctx['rootdir'], "share", "server", "main-coffee.js")
 
     repl = "javascript = %s %s" % (couchjs, mainjs)
+    if os.name == 'nt':
+        # Erlang always wants UNIX-style paths
+        repl = repl.replace("\\", "/")
     contents = re.sub("(?m)^javascript.*$", repl, contents)
 
     repl = "coffeescript = %s %s" % (couchjs, coffeejs)
+    if os.name == 'nt':
+        # Erlang always wants UNIX-style paths
+        repl = repl.replace("\\", "/")
     contents = re.sub("(?m)^coffeescript.*$", repl, contents)
 
     return contents


[46/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Stabilize users_db


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/47a120da
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/47a120da
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/47a120da

Branch: refs/heads/auth-tests-wip
Commit: 47a120da04243fb7a578187e94b85210f83b0c90
Parents: 869cf54
Author: sebastianro <se...@apache.org>
Authored: Tue May 17 21:12:02 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:58 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db.js | 47 +++++++++++++++++++++++++++-------
 1 file changed, 38 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/47a120da/test/javascript/tests/users_db.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index 7027b07..c075f89 100644
--- a/test/javascript/tests/users_db.js
+++ b/test/javascript/tests/users_db.js
@@ -18,6 +18,9 @@ couchTests.users_db = function(debug) {
   var users_db_name = '_users';
   var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
   try { usersDb.createDb(); } catch (e) { /* ignore if exists*/ }
+  // have a 2nd "normal" DB 2 provoke conflicts
+  var usersDbAlt = new CouchDB(get_random_db_name(), {"X-Couch-Full-Commit":"false"});
+  usersDbAlt.createDb();
 
   // test that you can treat "_user" as a db-name
   // this can complicate people who try to secure the users db with 
@@ -62,9 +65,13 @@ couchTests.users_db = function(debug) {
     });
     T(s.name == null);
     T(s.info.authenticated == "local");
-    
+    CouchDB.logout();
     
     // ok, now create a conflicting edit on the jchris doc, and make sure there's no login.
+    // (use replication to create the conflict) - need 2 be admin
+    CouchDB.login("jan", "apple");
+    CouchDB.replicate(usersDb.name, usersDbAlt.name);
+    // save in one DB
     var jchrisUser2 = JSON.parse(JSON.stringify(jchrisUserDoc));
     jchrisUser2.foo = "bar";
 
@@ -75,12 +82,17 @@ couchTests.users_db = function(debug) {
     } catch(e) {
       T(true);
     }
-    // save as bulk with new_edits=false to force conflict save
-    jchrisUserDoc._rev = "1-asd" // set new rev, changed in 2.x!
-    var resp = usersDb.bulkSave([jchrisUserDoc],{new_edits: false});
+
+    // then in the other
+    var jchrisUser3 = JSON.parse(JSON.stringify(jchrisUserDoc));
+    jchrisUser3.foo = "barrrr";
+    T(usersDbAlt.save(jchrisUser3).ok);
+    CouchDB.replicate(usersDbAlt.name, usersDb.name); // now we should have a conflict
 
     var jchrisWithConflict = usersDb.open(jchrisUserDoc._id, {conflicts : true});
     T(jchrisWithConflict._conflicts.length == 1);
+    CouchDB.logout();
+
     wait(5000) // wait for auth_cache invalidation
 
     // no login with conflicted user doc
@@ -97,10 +109,14 @@ couchTests.users_db = function(debug) {
     }
 
     // you can delete a user doc
+    // there is NO admin party here - so we have to login again
+    CouchDB.login("jan", "apple");
     s = CouchDB.session().userCtx;
-    T(s.name == null);
+    //T(s.name == null);
+    //console.log(JSON.stringify(usersDb.allDocs()));
     T(s.roles.indexOf("_admin") !== -1);
-    T(usersDb.deleteDoc(jchrisWithConflict).ok);
+// TODO: fix deletion of user docs
+//    T(usersDb.deleteDoc(jchrisWithConflict).ok);
 
     // you can't change doc from type "user"
     jchrisUserDoc = usersDb.open(jchrisUserDoc._id);
@@ -159,6 +175,7 @@ couchTests.users_db = function(debug) {
       name: "foo@example.org"
     }, ":bar");
     T(usersDb.save(doc).ok);
+    CouchDB.logout();
 
     T(CouchDB.session().userCtx.name == null);
 
@@ -175,11 +192,23 @@ couchTests.users_db = function(debug) {
 
   run_on_modified_server(
     [{section: "couch_httpd_auth",
+      key: "authentication_db", value: usersDb.name},
+     {section: "chttpd_auth",
+       key: "authentication_db", value: usersDb.name},
+     {section: "couch_httpd_auth",
       key: "iterations", value: "1"},
      {section: "admins",
       key: "jan", value: "apple"}],
-    testFun
+    function() {
+      try {
+        testFun();
+      } finally {
+        CouchDB.login("jan", "apple");
+        usersDb.deleteDb(); // cleanup
+        usersDbAlt.deleteDb(); // cleanup
+        CouchDB.logout();
+      }
+    }
   );
-  usersDb.deleteDb(); // cleanup
-  
+
 }


[49/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
cleanup wip


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f72b2530
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f72b2530
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f72b2530

Branch: refs/heads/auth-tests-wip
Commit: f72b2530103dff9c2784916ead2dad5331f075f3
Parents: b124719
Author: Jan Lehnardt <ja...@apache.org>
Authored: Tue Jul 12 20:28:13 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:59 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db.js          |  2 ++
 test/javascript/tests/users_db_security.js | 27 +++++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f72b2530/test/javascript/tests/users_db.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index c075f89..9c67ec5 100644
--- a/test/javascript/tests/users_db.js
+++ b/test/javascript/tests/users_db.js
@@ -104,6 +104,7 @@ couchTests.users_db = function(debug) {
       });
       T(false && "this will throw");
     } catch(e) {
+      log(e.error)
       T(e.error == "unauthorized");
       T(/conflict/.test(e.reason));
     }
@@ -205,6 +206,7 @@ couchTests.users_db = function(debug) {
       } finally {
         CouchDB.login("jan", "apple");
         usersDb.deleteDb(); // cleanup
+        usersDb.createDb();
         usersDbAlt.deleteDb(); // cleanup
         CouchDB.logout();
       }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/f72b2530/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index da51b23..a23c1d8 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");
@@ -126,8 +126,8 @@ couchTests.users_db_security = function(debug) {
     jchrisDoc.password = "couch";
 
     TEquals(true, save_as(usersDb, jchrisDoc, "jchris").ok);
-    // wait(5000);
-    var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1");
+    // wait(10000);
+    var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jan");
 
     TEquals(undefined, jchrisDoc.password, "password field should be null 2");
     TEquals(40, jchrisDoc.derived_key.length, "derived_key should exist");
@@ -147,9 +147,7 @@ couchTests.users_db_security = function(debug) {
     };
 
     usersDb.save(fdmananaDoc);
-
-    var fdmananaDocAsReadByjchris =
-      open_as(usersDb, "org.couchdb.user:fdmanana", "jchris1");
+    var fdmananaDocAsReadByjchris = open_as(usersDb, "org.couchdb.user:fdmanana", "jchris");
     TEquals(null, fdmananaDocAsReadByjchris,
       "should not_found opening another user's user doc");
 
@@ -204,7 +202,7 @@ couchTests.users_db_security = function(debug) {
 
     // non-admins can't read design docs
     try {
-      open_as(usersDb, "_design/user_db_auth", "jchris1");
+      open_as(usersDb, "_design/user_db_auth", "jchris");
       T(false, "non-admin read design doc, should not happen");
     } catch(e) {
       TEquals("forbidden", e.error, "non-admins can't read design docs");
@@ -308,7 +306,7 @@ couchTests.users_db_security = function(debug) {
         value: "false"
       }
     ], function() {
-      TEquals(true, CouchDB.login("jchris", "couch").ok);
+      TEquals(true, CouchDB.login("jchris", "mp3").ok);
 
       try {
         var all = usersDb.allDocs({ include_docs: true });
@@ -334,8 +332,15 @@ couchTests.users_db_security = function(debug) {
       key: "iterations", value: "1"},
    {section: "admins",
     key: "jan", value: "apple"}],
-    testFun
+    function() {
+      try {
+        testFun();
+      } finally {
+        CouchDB.login("jan", "apple");
+        usersDb.deleteDb(); // cleanup
+        usersDb.createDb();
+        CouchDB.logout();
+      }
+    }
   );
-  usersDb.deleteDb(); // cleanup
-  // wait(2000)
 };


[43/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
import fixes for COUCHDB-3054


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/01be91c1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/01be91c1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/01be91c1

Branch: refs/heads/auth-tests-wip
Commit: 01be91c129b5c698c8e3e8bc512cb69979d935e7
Parents: b3f8744
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jul 12 15:01:00 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jul 12 15:01:00 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/01be91c1/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 141a7a8..7054b53 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -29,7 +29,7 @@ DepDescs = [
 {b64url,           "b64url",           "6895652d80f95cdf04efb14625abed868998f174"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
-{chttpd,           "chttpd",           "0627357bfee793dea28f3822e952ddd31601fd92"},
+{chttpd,           "chttpd",           "5e3bf1f5e2e96841ce0d2b26606c7f590c067bdc"},
 {couch,            "couch",            "411c130ea63c3423d7ea71743095dfb446680da6"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "cfc354989a28865ec83efc0f745e91b8c6a3a6c3"},
@@ -42,7 +42,7 @@ DepDescs = [
 {docs,             "documentation",    "2dda387ea5cc21861d8797ea2c8a82c3b439d55f", [raw]},
 {ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
 {ets_lru,          "ets-lru",          "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric,           "fabric",           "aa17ddf3c149a7ac5316e5c821d0d704ac857960"},
+{fabric,           "fabric",           "ebea1b8f5d49fe60f326b33dbdc06176ecfea5d1"},
 {fauxton,          "fauxton",          {tag, "v1.1.5"}, [raw]},
 {folsom,           "folsom",           "a5c95dec18227c977029fbd3b638966d98f17003"},
 {global_changes,   "global-changes",   "203fb088ed81149108e64d18ffd9c3f5df154f97"},


[16/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Type spec fixes


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/718f5275
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/718f5275
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/718f5275

Branch: refs/heads/auth-tests-wip
Commit: 718f52755105b1035f638527bea29a79f5416317
Parents: d237444
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:22:22 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:41 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/718f5275/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 4e62684..ee7250c 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -32,8 +32,8 @@ DepDescs = [
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
 {couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
 {couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
-{couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
-{couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},
+{couch_mrview,     "couch-mrview",     "d07771ac4255d3b217a993e807f1e9620b38dbee"},
+{couch_replicator, "couch-replicator", "8697441137d635fbd6490692cb075912b36c7239"},
 {couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
 {couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},
 {couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
@@ -52,7 +52,7 @@ DepDescs = [
 {jiffy,            "jiffy",            "ea19c417f9fd52fa3f7ef2d378735e5532c59b29"},
 {khash,            "khash",            "7c6a9cd9776b5c6f063ccafedfa984b00877b019"},
 {mango,            "mango",            "01252f971bef0c8da1d78bf5a7b506b71926ce1b"},
-{mem3,             "mem3",             "386545186e5a31a42fc68c82d0e36f8407bf4739"},
+{mem3,             "mem3",             "15615b295ec970ca9b12b7b54107a80b95149511"},
 {mochiweb,         "mochiweb",         "bd6ae7cbb371666a1f68115056f7b30d13765782"},
 {oauth,            "oauth",            "099057a98e41f3aff91e77e3cf496d6c6fd901df"},
 {rexi,             "rexi",             "a327b7dbeb2b0050f7ca9072047bf8ef2d282833"},


[40/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
64 too high, 10 is sufficient


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/116aca84
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/116aca84
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/116aca84

Branch: refs/heads/auth-tests-wip
Commit: 116aca840ac0e47d72e17068c941aa624b4a351b
Parents: 638b5cb
Author: Robert Newson <rn...@apache.org>
Authored: Mon Jul 4 17:16:28 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Mon Jul 4 17:16:28 2016 +0100

----------------------------------------------------------------------
 test/javascript/tests/attachments.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/116aca84/test/javascript/tests/attachments.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/attachments.js b/test/javascript/tests/attachments.js
index 1baea65..b40096c 100644
--- a/test/javascript/tests/attachments.js
+++ b/test/javascript/tests/attachments.js
@@ -218,7 +218,7 @@ couchTests.attachments= function(debug) {
 
   // test large attachments - COUCHDB-366
   var lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '
-  for (var i=0; i<64; i++) {
+  for (var i=0; i<10; i++) {
     lorem = lorem + lorem;
   }
   var xhr = CouchDB.request("PUT", "/" + db_name + "/bin_doc5/lorem.txt", {
@@ -234,7 +234,7 @@ couchTests.attachments= function(debug) {
 
   // test large inline attachment too
   var lorem_b64 = 'TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4g'
-  for (var i=0; i<64; i++) {
+  for (var i=0; i<10; i++) {
     lorem_b64 = lorem_b64 + lorem_b64;
   }
   var doc = db.open("bin_doc5", {attachments:true});


[42/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
apply 'Handle ssl socket case' in chttpd


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b3f8744b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b3f8744b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b3f8744b

Branch: refs/heads/auth-tests-wip
Commit: b3f8744b1160ef9d5a9bab8f65ff35c2d30e6e6a
Parents: 3bc67cb
Author: Robert Newson <rn...@apache.org>
Authored: Thu Jul 7 16:49:37 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jul 7 16:49:54 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b3f8744b/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 295edc2..141a7a8 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -29,7 +29,7 @@ DepDescs = [
 {b64url,           "b64url",           "6895652d80f95cdf04efb14625abed868998f174"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
-{chttpd,           "chttpd",           "b468c7de32c601bd2710b04ff71cecb8d3f0540f"},
+{chttpd,           "chttpd",           "0627357bfee793dea28f3822e952ddd31601fd92"},
 {couch,            "couch",            "411c130ea63c3423d7ea71743095dfb446680da6"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "cfc354989a28865ec83efc0f745e91b8c6a3a6c3"},


[10/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Enable read_concurrency for config ets table


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fdb37b17
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fdb37b17
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fdb37b17

Branch: refs/heads/auth-tests-wip
Commit: fdb37b170d026b72e96ab01e1159c68ce25eda80
Parents: e24a18b
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 06:58:06 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fdb37b17/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 2f9f0ce..9638275 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -24,7 +24,7 @@ os:putenv("COUCHDB_APPS_CONFIG_DIR", filename:join([COUCHDB_ROOT, "rel/apps"])).
 DepDescs = [
 %% must be compiled first as it has a custom behavior
 {couch_epi,        "couch-epi",        "5a7f2868c720bc428e6c888dc61d988b9a5f63f1"},
-{config,           "config",           "a2d5ad2eedc960248b806f61df0a1009462bdb46"},
+{config,           "config",           "60977f81dc06af4a3d1e89891b3061ed4cd01e95"},
 %% keep these sorted
 {b64url,           "b64url",           "319fc604235ab1fde37047b38a432450161db750"},
 {couch_log,        "couch-log",        "e4abbd3874356dc7a201b09676e27ff7dc8bed7c"},


[11/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
couch: limit maximum pread size


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2b1d801c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2b1d801c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2b1d801c

Branch: refs/heads/auth-tests-wip
Commit: 2b1d801c70397774b9cbdc84ef089de73202023d
Parents: 7cd1088
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 07:01:22 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 08:36:40 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2b1d801c/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 8311942..606ddf5 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -30,7 +30,7 @@ DepDescs = [
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "b2a0471a87765de50c5eb05c65c121f68a9ae9fa"},
 {chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
-{couch,            "couch",            "49774f269a6a42af05ead4f17b52edda5f065c78"},
+{couch,            "couch",            "23f188096fb8f8c867f3cda0fa55c30ecce34b10"},
 {couch_index,      "couch-index",      "aa8e6f9573a2dd04bf5a1a98576b1809e1a68035"},
 {couch_mrview,     "couch-mrview",     "e36509b2dfb7bba5f09fcb62f0e23a538451afb5"},
 {couch_replicator, "couch-replicator", "ab0afce2d6fdfeeade636a9252327ac09a1e423f"},


[23/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Merge remote branch 'cloudant:bump-deps'

This closes #420

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1e25dc1a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1e25dc1a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1e25dc1a

Branch: refs/heads/auth-tests-wip
Commit: 1e25dc1a5f435546b2edba453310e3338800d528
Parents: e24a18b 718f527
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed May 25 10:02:14 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed May 25 10:02:14 2016 -0700

----------------------------------------------------------------------
 rebar.config.script | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[45/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Stabilize cookie_auth


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/869cf544
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/869cf544
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/869cf544

Branch: refs/heads/auth-tests-wip
Commit: 869cf544a119426d94ff0c783415467618d3a591
Parents: 6411a40
Author: sebastianro <se...@apache.org>
Authored: Tue May 17 20:03:30 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:58 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/cookie_auth.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/869cf544/test/javascript/tests/cookie_auth.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/cookie_auth.js b/test/javascript/tests/cookie_auth.js
index 9a14416..5c8ce89 100644
--- a/test/javascript/tests/cookie_auth.js
+++ b/test/javascript/tests/cookie_auth.js
@@ -75,7 +75,7 @@ couchTests.cookie_auth = function(debug) {
 
       // test that the users db is born with the auth ddoc
       var ddoc = open_as(usersDb, "_design/_auth", "jan");
-      T(ddoc.validate_doc_update);
+      T(ddoc && ddoc.validate_doc_update);
 
       // TODO test that changing the config so an existing db becomes the users db installs the ddoc also
 
@@ -277,10 +277,17 @@ couchTests.cookie_auth = function(debug) {
     TEquals(true, CouchDB.login("jan", "apple").ok);
   };
 
+  // per se, _users is born with a ddoc
+  // problem is: the birth seems async and it takes some time till it is there. We do know, however, that it WILL. So: use _changes 2 our advantage
+  var users_db_chg = CouchDB.request("GET", users_db_name + "/_changes?feed=longpoll&timeout=5000&filter=_design");
+  T(users_db_chg.responseText);
+  // now we should be safe
   run_on_modified_server(
     [
      {section: "couch_httpd_auth",
       key: "authentication_db", value: users_db_name},
+     {section: "chttpd_auth",
+      key: "authentication_db", value: users_db_name},
      {section: "couch_httpd_auth",
       key: "iterations", value: "1"},
      {section: "admins",


[35/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
Point erl to sys.config file

Add -config path/to/sys.config argument to erlexec.

COUCHDB-2384


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9be42f6a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9be42f6a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9be42f6a

Branch: refs/heads/auth-tests-wip
Commit: 9be42f6aa8ef4169a9efaf4e727fcd48cfe03d52
Parents: aa0c08c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Thu Jun 23 16:11:58 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Jun 27 09:26:09 2016 -0700

----------------------------------------------------------------------
 rel/overlay/bin/couchdb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9be42f6a/rel/overlay/bin/couchdb
----------------------------------------------------------------------
diff --git a/rel/overlay/bin/couchdb b/rel/overlay/bin/couchdb
index a816715..f64bd44 100755
--- a/rel/overlay/bin/couchdb
+++ b/rel/overlay/bin/couchdb
@@ -27,4 +27,5 @@ export EMU=beam
 export PROGNAME=`echo $0 | sed 's/.*\///'`
 
 exec $BINDIR/erlexec -boot $ROOTDIR/releases/$APP_VSN/couchdb \
-    -args_file $ROOTDIR/etc/vm.args
+     -args_file $ROOTDIR/etc/vm.args \
+     -config $ROOTDIR/releases/$APP_VSN/sys.config


[26/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
[chttpd] Pass user context in couch_doc_open


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5e8041e9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5e8041e9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5e8041e9

Branch: refs/heads/auth-tests-wip
Commit: 5e8041e96b0cdc2be75461e7ea4fb69894871e4b
Parents: 514d95e
Author: Robert Newson <rn...@apache.org>
Authored: Thu Jun 16 23:26:03 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jun 16 23:26:03 2016 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5e8041e9/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index d2cfc66..d5cf95e 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -29,7 +29,7 @@ DepDescs = [
 {b64url,           "b64url",           "6895652d80f95cdf04efb14625abed868998f174"},
 {couch_log,        "couch-log",        "cc5540419e0a4bb7872d18bc5a94f39446d83a88"},
 {couch_log_lager,  "couch-log-lager",  "a7a8b7efb8855a8b0cf9612eeca7c190c414bbfb"},
-{chttpd,           "chttpd",           "f3d5d1b0cd8eda814805b5a7290892ee0b3a73ab"},
+{chttpd,           "chttpd",           "21be898160793be392288b41230fe0ac74255c23"},
 {couch,            "couch",            "be1dedb8e0facdfb355ef489c8ffd575bd7dccc9"},
 {couch_index,      "couch-index",      "e7d269800302224eacf9585f74eb30822495755b"},
 {couch_mrview,     "couch-mrview",     "d07771ac4255d3b217a993e807f1e9620b38dbee"},


[48/50] couchdb commit: updated refs/heads/auth-tests-wip to c34d871

Posted by ja...@apache.org.
remove upgrade on auth test


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c2fd04dd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c2fd04dd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c2fd04dd

Branch: refs/heads/auth-tests-wip
Commit: c2fd04dd8e515d45cbb552a39b218504e52e0608
Parents: 47a120d
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jun 21 13:23:34 2016 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Tue Jul 12 20:55:59 2016 +0200

----------------------------------------------------------------------
 test/javascript/tests/users_db_security.js | 32 -------------------------
 1 file changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2fd04dd/test/javascript/tests/users_db_security.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index 355bb03..e66b3ec 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -148,38 +148,6 @@ couchTests.users_db_security = function(debug) {
       TEquals(true, userDoc.derived_key != jchrisDoc.derived_key,
         "should have new derived_key");
 
-      // SHA-1 password hashes are upgraded to PBKDF2 on successful
-      // authentication
-      var rnewsonDoc = {
-        _id: "org.couchdb.user:rnewson",
-        type: "user",
-        name: "rnewson",
-        // password: "plaintext_password",
-        password_sha: "e29dc3aeed5abf43185c33e479f8998558c59474",
-        salt: "24f1e0a87c2e374212bda1073107e8ae",
-        roles: []
-      };
-
-      var password_sha = rnewsonDoc.password_sha,
-        salt = rnewsonDoc.salt,
-        derived_key,
-        iterations;
-
-      usersDb.save(rnewsonDoc);
-      rnewsonDoc = open_as(usersDb, rnewsonDoc._id, "jan");
-      T(!rnewsonDoc.password_scheme);
-      T(!rnewsonDoc.derived_key);
-      T(!rnewsonDoc.iterations);
-
-      // check that we don't upgrade when the password is wrong
-      TEquals("unauthorized", CouchDB.login("rnewson", "wrong_password").error);
-      rnewsonDoc = open_as(usersDb, rnewsonDoc._id, "jan");
-      TEquals(salt, rnewsonDoc.salt);
-      TEquals(password_sha, rnewsonDoc.password_sha);
-      T(!rnewsonDoc.password_scheme);
-      T(!rnewsonDoc.derived_key);
-      T(!rnewsonDoc.iterations);
-
       wait(5000); // wait for auth cache invalidation
       var r = CouchDB.login("rnewson", "plaintext_password")
       log(r)