Uniter tests for update-status hook - BLOCKER

Nate Finch nate.finch at canonical.com
Mon Jul 20 18:41:06 UTC 2015


On Mon, Jul 20, 2015 at 12:42 AM Tim Penhey <tim.penhey at canonical.com>
wrote:

>
> Aside from all this work, it is becoming REALLY IMPORTANT that we stop
> writing terrible, wasteful, full integration type tests when what we
> really care about testing is some aspect of uniter internals. I know
> that it is just simpler to copy what is there and make more, but it is
> better to write smaller, targeted tests that just test what you are
> wanting to assert.
>

+100

If you start writing tests and you reach for JujuConnSuite, stop.  You
should be able to get to 80% code coverage (and near 100% logic coverage)
without using anything outside your package.  Just provide some stub
implementations of interfaces and assert that the logic run against those
interfaces is correct.  If you have too many dependencies on code outside
your package, start writing interfaces and refactor your code to use them
instead of explicitly relying on external types.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150720/de23cce1/attachment.html>


More information about the Juju-dev mailing list