Advice on unit testing reactive handlers?
Pete Vander Giessen
petevg at gmail.com
Mon Apr 11 16:01:56 UTC 2016
@Stuart Bishop: Thank you. I am reading through the code now. It looks both
thorough and helpful (probably what I should have expected from something
related to PostgreSQL :-) )
On Sun, Apr 10, 2016 at 11:13 PM Stuart Bishop <stuart.bishop at canonical.com>
wrote:
> On 10 April 2016 at 22:31, Pete Vander Giessen <petevg at gmail.com> wrote:
> > Hello All,
> >
> > I'm currently working on writing a layered charm, and I had a question
> about
> > unit (or unit-ish) testing. Is it practical to write unit test for, say,
> > helpers for a reactive handler? Does anybody have any favorite examples
> they
> > can point me at?
> >
> > There's a lot of awesome automagic in a juju charm, but I'm having a
> little
> > trouble setting up paths and environments with that magic mocked out for
> > unit-style tests. :-/
> >
> > (The reason I'm trying to write smaller tests is that I'd like to speed
> up
> > my testing cycle while I'm still in the obvious mistakes and silly typos
> > stage of writing the charm)
>
> https://git.launchpad.net/postgresql-charm has both unit and integration
> tests.
> https://git.launchpad.net/postgresql-charm/tree/tests/test_postgresql.py
> are the bulk of the unit tests, testing the helpers in
> reactive/postgresql/postgresql.py.
>
> --
> Stuart Bishop <stuart.bishop at canonical.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160411/0463659c/attachment.html>
More information about the Juju
mailing list