Repository: couchdb-couch
Updated Branches:
  refs/heads/master b4295bfe5 -> 5fa909871


Use couch_tests applications for couch_db_plugin_tests


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

Branch: refs/heads/master
Commit: 2a7387c6009c147bf7a5901345bd3239df70d1e0
Parents: b4295bf
Author: ILYA Khlopotov <iil...@ca.ibm.com>
Authored: Thu Mar 17 10:43:43 2016 -0700
Committer: ILYA Khlopotov <iil...@ca.ibm.com>
Committed: Thu Mar 17 10:43:43 2016 -0700

----------------------------------------------------------------------
 test/couch_db_plugin_tests.erl | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2a7387c6/test/couch_db_plugin_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_db_plugin_tests.erl b/test/couch_db_plugin_tests.erl
index 2fb6e3a..3f69e79 100644
--- a/test/couch_db_plugin_tests.erl
+++ b/test/couch_db_plugin_tests.erl
@@ -45,15 +45,12 @@ 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).
 
 validate_dbname({true, _Db}, _) -> true;
 validate_dbname({false, _Db}, _) -> false;

Reply via email to