New helper library for unit-testing charms

Cory Johns cory.johns at canonical.com
Wed Oct 12 14:29:08 UTC 2016


Free,

This looks fantastic!  Can I request that you cross-post this over to the
main Juju mailing list, as it would be very helpful for the community as a
whole?

On Tue, Oct 11, 2016 at 4:57 AM, Free Ekanayaka <
free.ekanayaka at canonical.com> wrote:

> Hello,
>
> I published a couple of new Python packages aimed at making unit tests for
> charms easier and nicer:
>
> https://github.com/freeekanayaka/charm-test
> https://github.com/freeekanayaka/systemfixtures
>
> They implement the classic approach [0] of replacing the "boundaries" of a
> charm (hook tools, processes, filesystem, network, etc) with realistic
> fakes, so your unit tests run actual code as much as possible and you don't
> have to mock internal APIs that directly or indirectly interact with the
> boundaries (often leading to mocking explosion).
>
> Besides the package documentation, you might want to have a look to the
> jenkins charm reactive rewrite branch [1] to see some real-world use.
>
> If there's interest around this, we could move the code under the juju
> GitHub tree, or even merge it to the charm.unit package [2].
>
> Cheers,
>
> Free
>
> [0] http://martinfowler.com/articles/mocksArentStubs.html
> [1] https://github.com/freeekanayaka/layer-jenkins
> [2] https://github.com/juju-solutions/charms.unit
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20161012/fd841bec/attachment.html>


More information about the Juju-dev mailing list