couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [1/3] chttpd commit: updated refs/heads/master to cefabd0
Date Tue, 22 Mar 2016 12:34:16 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master ab299ebfc -> cefabd0ec


Use couch_tests applications for chttpd_plugin_tests


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

Branch: refs/heads/master
Commit: 46de497cddf2785e7afdf7f3f5c92132b819a762
Parents: ab299eb
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Thu Mar 17 10:36:53 2016 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Thu Mar 17 10:36:53 2016 -0700

----------------------------------------------------------------------
 test/chttpd_plugin_tests.erl | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/46de497c/test/chttpd_plugin_tests.erl
----------------------------------------------------------------------
diff --git a/test/chttpd_plugin_tests.erl b/test/chttpd_plugin_tests.erl
index e8d68b5..4b6334f 100644
--- a/test/chttpd_plugin_tests.erl
+++ b/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)
+    ], [], []).
+
+teardown(Ctx) ->
+    couch_tests:teardown(Ctx).
 
 before_request({true, Id}) -> [{true, [{before_request, Id}]}];
 before_request({false, Id}) -> [{false, Id}];


Mime
View raw message