https://codereview.appspot.com/6862053/diff/1/state/conn_test.go#newcode99
state/conn_test.go:99: func (cs *ConnSuite) AddService(c *C, charmName
string) *state.Service {
I can easily see tests being copy & pasted and changing their meaning
wildly and silently depending on where the logic is pasted.
This should probably be AddService(c, charmName, serviceName), plus fail
the test if service name exists.
https:/ /codereview. appspot. com/6862053/ diff/1/ state/conn_ test.go
File state/conn_test.go (right):
https:/ /codereview. appspot. com/6862053/ diff/1/ state/conn_ test.go# newcode99 test.go: 99: func (cs *ConnSuite) AddService(c *C, charmName
state/conn_
string) *state.Service {
I can easily see tests being copy & pasted and changing their meaning
wildly and silently depending on where the logic is pasted.
This should probably be AddService(c, charmName, serviceName), plus fail
the test if service name exists.
https:/ /codereview. appspot. com/6862053/ diff/1/ state/conn_ test.go# newcode122 test.go: 122: cs.RemoveUnit(c, unit)
state/conn_
How often is that done/necessary in a test?
https:/ /codereview. appspot. com/6862053/ diff/1/ state/conn_ test.go# newcode154 test.go: 154: err := unit.UnassignFr omMachine( )
state/conn_
Why do we have to unassign the principal? We should be able to remove a
unit without every unassigning it, right?
https:/ /codereview. appspot. com/6862053/