You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by janl <gi...@git.apache.org> on 2016/07/12 19:44:42 UTC

[GitHub] couchdb pull request #432: fixes auth tests in JS suite.

GitHub user janl opened a pull request:

    https://github.com/apache/couchdb/pull/432

    fixes auth tests in JS suite.

    Thanks to @sebastianrothbucher and @rnewson for their tireless effort in getting this going <3
    
    This is the last major one before 2.0 RCs. Let\u2019s get this shipped!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/couchdb auth-tests-wip

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/432.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #432
    
----
commit 6411a40494f0e8f59a8852c17a7d9692b2a19ad9
Author: Jan Lehnardt <ja...@apache.org>
Date:   2016-05-16T17:30:19Z

    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.
    
    * * *

commit 869cf544a119426d94ff0c783415467618d3a591
Author: sebastianro <se...@apache.org>
Date:   2016-05-17T18:03:30Z

    Stabilize cookie_auth

commit 47a120da04243fb7a578187e94b85210f83b0c90
Author: sebastianro <se...@apache.org>
Date:   2016-05-17T19:12:02Z

    Stabilize users_db

commit c2fd04dd8e515d45cbb552a39b218504e52e0608
Author: Robert Newson <rn...@apache.org>
Date:   2016-06-21T12:23:34Z

    remove upgrade on auth test

commit b124719e84c020b996f4b5bfeb577ebda99d36f5
Author: Jan Lehnardt <ja...@apache.org>
Date:   2016-06-23T10:24:48Z

    More users_db_security.js work.
    
    take out nested, superfluous run_on_modified_server calls
    
    update to latest fabric.

commit f72b2530103dff9c2784916ead2dad5331f075f3
Author: Jan Lehnardt <ja...@apache.org>
Date:   2016-07-12T18:28:13Z

    cleanup wip

commit c34d871bb1631513868f8a0594c95001e910964f
Author: Jan Lehnardt <ja...@apache.org>
Date:   2016-07-12T19:40:25Z

    get full suite to run

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request #432: fixes auth tests in JS suite.

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb/pull/432


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---