You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2016/03/17 18:40:51 UTC

[GitHub] couchdb-chttpd pull request: Use couch_tests applications for chtt...

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/108

    Use couch_tests applications for chttpd_plugin_tests

    This fixes the problem with chttpd_plugin_tests. Previously following would fail:
    ```
    make eunit apps=chttpd tests=callback_test,error_info_test
    ```
    In order to test this PR you would need to add https://github.com/apache/couchdb-erlang-tests/pull/1 as a dependency in `rebar.config.script`. You might need to add the app into `rel/reltool.config` as well.

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

    $ git pull https://github.com/cloudant/couchdb-chttpd fix-chttpd_plugin_tests

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

    https://github.com/apache/couchdb-chttpd/pull/108.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 #108
    
----
commit 46de497cddf2785e7afdf7f3f5c92132b819a762
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2016-03-17T17:36:53Z

    Use couch_tests applications for chttpd_plugin_tests

----


---
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-chttpd pull request: Use couch_tests applications for chtt...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-chttpd/pull/108#issuecomment-197995872
  
    +1


---
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-chttpd pull request: Use couch_tests applications for chtt...

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

    https://github.com/apache/couchdb-chttpd/pull/108


---
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-chttpd pull request: Use couch_tests applications for chtt...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/108#discussion_r56547010
  
    --- Diff: test/chttpd_plugin_tests.erl ---
    @@ -43,16 +43,14 @@ data_subscriptions() -> [].
     processes() -> [].
     notify(_, _, _) -> ok.
     
    +
     setup() ->
    -    application:stop(couch_epi), % in case it's already running from other tests...
    -    application:unload(couch_epi),
    -    ok = application:load(couch_epi),
    -    ok = application:set_env(couch_epi, plugins, [?MODULE]), % only this plugin
    -    ok = application:start(couch_epi).
    -
    -teardown(_) ->
    -    ok = application:stop(couch_epi),
    -    ok = application:unload(couch_epi).
    +    couch_tests:setup([
    +        couch_epi_dispatch:dispatch(chttpd, ?MODULE)
    +    ], [], []).
    --- End diff --
    
    Feels like this has a potential for further simplification:
    ```
    couch_tests:setup([couch_epi_dispatch:dispatch(chttpd, ?MODULE)])
    ```
    
    or even:
    
    ```
    couch_tests:setup_epi(?MODULE, [chttpd])
    ```


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