Also, please give each test a unique description and log that
description inside the test's loop, that way it's clear what test fails
(otherwise there's no way to know which of the tests in the loop
failed). It can be something like "State machine should always use
localhost" and "non-state machine should use the address given".
I think we need to test that we're actually passing the results of the
address picker into apiOpen.
https:/ /codereview. appspot. com/100810045/ diff/20001/ cmd/jujud/ agent_test. go agent_test. go (right):
File cmd/jujud/
https:/ /codereview. appspot. com/100810045/ diff/20001/ cmd/jujud/ agent_test. go#newcode114 agent_test. go:114: type replaceErrors struct {
cmd/jujud/
You can put this type definition right in the test function, and I think
you should :)
https:/ /codereview. appspot. com/100810045/ diff/20001/ cmd/jujud/ agent_test. go#newcode362 agent_test. go:362: type providedExpecte dAddresses struct {
cmd/jujud/
move this into the test, and you can give it a less long name.
Also, please give each test a unique description and log that
description inside the test's loop, that way it's clear what test fails
(otherwise there's no way to know which of the tests in the loop
failed). It can be something like "State machine should always use
localhost" and "non-state machine should use the address given".
https:/ /codereview. appspot. com/100810045/