Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Added command to compact all couchDB views #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tischi86
Copy link

Added a command to compact all couchDB views

@Ocramius
Copy link
Member

Requires test cases

@hco
Copy link

hco commented Dec 23, 2016

Hey @Ocramius,

could you maybe help to get this merged by suggesting a sane way to test this? We discussed this internally, and could not really decide on a way to test this that brings a real benefit at an acceptable cost. :)

Greetings from Witten!

@mikeSimonson
Copy link
Contributor

@hco, here you created a command that just use the library appropriately. So your test should make sure that when the command is used, the appropriate calls are passed to it with the corresponding options.

You can do that by mocking the library and assert the calls and options passed to the mock.
The issue here is that you need to mock the getHelper() method and all the objects that you use to get the mongoDb client before you can test what is passed to it but it's doable.

@hco
Copy link

hco commented Feb 27, 2017

In my opinion a test that mocks away nearly all calls does not really have any benefit.

An integration test that would actually talk to CouchDB would make sense - is there any infrastructure for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants