Re: Advice on unit testing reactive handlers?
@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 wrote: > On 10 April 2016 at 22:31, Pete Vander Giessen 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 > -- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju
Re: Advice on unit testing reactive handlers?
On 10 April 2016 at 22:31, Pete Vander Giessen 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 -- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju
Advice on unit testing reactive handlers?
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) Thank you in advance, ~ PeteVG -- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju