Code review comment for lp://staging/~fwereade/juju-core/strawman-state-test-simplification

Revision history for this message
William Reade (fwereade) wrote :

Reviewers: mp+138465_code.launchpad.net,

Message:
Please take a look.

Description:
state: more expressive testing proposal

This shouldn't go in on its own -- I should fix up the rest of the state
tests before I merge it (and I don't want to fix machine_test until
we've
dropped the orgiginal WatchPrincipalUnits implementation) but I think
that
AssignSuite was a good enough test bed to evaluate the sanity of this
approach.

In particular, I found that even a few lines saved here and there made
it
much easier to follow the tests, and to notice both redundant tests and
missing ones; and that in some cases a *lot* of lines were saved.

I'm not sure AssignSuite uses all the new ConnSuite features yet (they
were
originally written against machine_test, but then I got demoralised) but
I'm
pretty sure that they will be useful; if not, of course, I'll trash
them.

https://code.launchpad.net/~fwereade/juju-core/strawman-state-test-simplification/+merge/138465

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6862053/

Affected files:
   A [revision details]
   M state/assign_test.go
   M state/conn_test.go
   M state/life_test.go
   M state/unit.go

« Back to merge proposal