Testing api clients
Andrew Wilkins
andrew.wilkins at canonical.com
Thu Sep 11 04:57:08 UTC 2014
Hi folks,
I'd like to bring a small, recent addition to everyone's attention:
https://github.com/juju/juju/blob/master/api/base/testing/patch.go
PatchFacadeCaller can be used (and is used now in several places) to avoid
calling through to a real API server in api tests. Ideally we'd just
provide mock FacadeCallers to begin with, but this alleviates some of the
pain between now and when we do that across all the existing tests.
If you're writing tests for api clients, please consider using
PatchFacadeCaller or a mock FacadeCaller, so we can improve test coverage
and avoid slow tests.
Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140911/11a315af/attachment.html>
More information about the Juju-dev
mailing list