Repository: couchdb-chttpd Updated Branches: refs/heads/master 928bb2e4b -> 90bd04811
Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293 Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/cae3664d Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/cae3664d Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/cae3664d Branch: refs/heads/master Commit: cae3664d6583adf110302704fb546b4565e19b91 Parents: 928bb2e Author: ILYA Khlopotov <iil...@apache.org> Authored: Thu Feb 9 13:36:39 2017 -0800 Committer: ILYA Khlopotov <iil...@apache.org> Committed: Thu Feb 9 13:57:42 2017 -0800 ---------------------------------------------------------------------- test/chttpd_db_bulk_get_test.erl | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/cae3664d/test/chttpd_db_bulk_get_test.erl ---------------------------------------------------------------------- diff --git a/test/chttpd_db_bulk_get_test.erl b/test/chttpd_db_bulk_get_test.erl index a5edcc0..f892131 100644 --- a/test/chttpd_db_bulk_get_test.erl +++ b/test/chttpd_db_bulk_get_test.erl @@ -19,6 +19,7 @@ setup() -> + mock(config), mock(chttpd), mock(couch_epi), mock(couch_httpd), @@ -31,6 +32,7 @@ setup() -> teardown(Pid) -> ok = stop_accumulator(Pid), + meck:unload(config), meck:unload(chttpd), meck:unload(couch_epi), meck:unload(couch_httpd), @@ -270,6 +272,10 @@ mock(couch_stats) -> ok; mock(fabric) -> ok = meck:new(fabric, [passthrough]), + ok; +mock(config) -> + ok = meck:new(config, [passthrough]), + ok = meck:expect(config, get, fun(_, _, Default) -> Default end), ok.