Code review comment for lp:~fwereade/pyjuju/go-place-unit

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

LGTM, thanks. It'd be nice to move the helper function back where it was
(or around where it was, anyway).

https://codereview.appspot.com/6248076/diff/5001/state/state_test.go
File state/state_test.go (right):

https://codereview.appspot.com/6248076/diff/5001/state/state_test.go#newcode1062
state/state_test.go:1062: func (s *StateSuite) TestAddRelation(c *C) {
This shouldn't be here, I suspect.

https://codereview.appspot.com/6248076/diff/5001/state/util.go
File state/util.go (right):

https://codereview.appspot.com/6248076/diff/5001/state/util.go#newcode26
state/util.go:26: func AssignUnit(st *State, u *Unit, policy
AssignmentPolicy) (err error) {
It's fine to have this as a function in the place where it was. It's a
much better spot than here, as it had all the logic surrounding it just
a glance away.

https://codereview.appspot.com/6248076/

« Back to merge proposal