Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Mock config module in tests
The tests in chttpd_db_bulk_get_test do not start config app.
The change in apache/couchdb-couch#226
introduces call to config app.
Make sure we mock config so the tests pass.

COUCHDB-3293
  • Loading branch information
iilyak committed Feb 9, 2017
1 parent 928bb2e commit cae3664d6583adf110302704fb546b4565e19b91
Showing 1 changed file with 6 additions and 0 deletions.
@@ -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.


0 comments on commit cae3664

Please sign in to comment.