Fixes lp:1596858 and refactors the deploy command #6144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This work builds on previous work to refactor the deploy command to take
in an API interface instead of instantiating clients throughout. This
brings us closer to achieving that goal and allows us to write unit
tests for the majority of the deploy command (majority of the current
tests are so-called "full-stack").
The highlights of this patch are:
the bug. The details can still be achieved by passing the
--debug
flag to the command.
bundles. This check is done in a single test and need not be
replicated everywhere.
callMocker
to assist with mocking interfaces fortets. This can be found in deploy_test.go. In the long run, it would
be nice for this type to move over to juju/testing to live with the
Stub
class.(Review request: http://reviews.vapour.ws/r/5582/)