Fwd: New helper library for unit-testing charms
free.ekanayaka at canonical.com
Wed Oct 12 15:23:34 UTC 2016
Cross-posting here as well from juju-dev, since this might be more broadly
helpful to the community.
---------- Forwarded message ----------
From: Free Ekanayaka <free.ekanayaka at canonical.com>
Date: 11 October 2016 at 10:57
Subject: New helper library for unit-testing charms
To: "juju-dev at lists.ubuntu.com" <juju-dev at lists.ubuntu.com>
I published a couple of new Python packages aimed at making unit tests for
charms easier and nicer:
They implement the classic approach  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  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 .
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Juju