Code review comment for lp://qastaging/~james-w/desktopcouch/context-for-tests

Revision history for this message
James Westby (james-w) wrote :

Hi,

This implements fixes for a couple of bugs that I filed to
make it easier to use desktopcouch in testing other projects.

The first use-case is testing against a private desktopcouch
for projects that use it, without stomping on the information
stored in gnome-keyring.

After that I wanted to re-use desktopcouch's knowledge of stopping
and starting couchdb in a project where I wanted to use plain couch,
not a desktop one, so I added with_auth to just have it skip all
the credentials stuff and just start a couchdb in a private area
for testing.

There aren't any tests for it, for two reasons:

  * The setup of a private context is done at import time, which
    is then re-used. I could do a similar thing in a couple of tests
    to change the arguments, but...

  * The tests themselves are not isolated from gnome-keyring. Therefore
    I wondered if they wanted to make use of the with_keyring argument,
    though that would mean that codepath wasn't tested.

Therefore I would like some guidance on what the preferred testing
strategy would be for this.

Thanks,

James

« Back to merge proposal