From cae3664d6583adf110302704fb546b4565e19b91 Mon Sep 17 00:00:00 2001 From: ILYA Khlopotov Date: Thu, 9 Feb 2017 13:36:39 -0800 Subject: [PATCH] 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 --- test/chttpd_db_bulk_get_test.erl | 6 ++++++ 1 file changed, 6 insertions(+) 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.