Merge lp:~thumper/juju-core/refactor-uniter-tests into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2141 |
Proposed branch: | lp:~thumper/juju-core/refactor-uniter-tests |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~thumper/juju-core/juju-run-listener |
Diff against target: |
510 lines (+185/-112) 5 files modified
worker/uniter/context.go (+33/-16) worker/uniter/context_test.go (+7/-2) worker/uniter/export_test.go (+8/-0) worker/uniter/uniter.go (+112/-48) worker/uniter/uniter_test.go (+25/-46) |
To merge this branch: | bzr merge lp:~thumper/juju-core/refactor-uniter-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+198668@code.launchpad.net |
Commit message
Refactor uniter tests
We needed to have a better way to match the hooks that had been executed by
the uniter in the tests. Instead of relying on log messages that the hooks
wrote out, instead we have the uniter optionally call out to an observer.
Part of this work also involved breaking up some of the larger methods in the
Context and the Uniter methods. These broken up bits are used by the code
that runs generic commands coming shortly.
A fundamental change is that now if a hook is missing, instead of silently
passing, the context now returns a missingHookError.
Description of the change
Refactor uniter tests
We needed to have a better way to match the hooks that had been executed by
the uniter in the tests. Instead of relying on log messages that the hooks
wrote out, instead we have the uniter optionally call out to an observer.
Part of this work also involved breaking up some of the larger methods in the
Context and the Uniter methods. These broken up bits are used by the code
that runs generic commands coming shortly.
A fundamental change is that now if a hook is missing, instead of silently
passing, the context now returns a missingHookError.
Reviewers: mp+198668_ code.launchpad. net,
Message:
Please take a look.
Description:
Refactor uniter tests
We needed to have a better way to match the hooks that had been executed
by
the uniter in the tests. Instead of relying on log messages that the
hooks
wrote out, instead we have the uniter optionally call out to an
observer.
Part of this work also involved breaking up some of the larger methods
in the
Context and the Uniter methods. These broken up bits are used by the
code
that runs generic commands coming shortly.
A fundamental change is that now if a hook is missing, instead of
silently
passing, the context now returns a missingHookError.
https:/ /code.launchpad .net/~thumper/ juju-core/ refactor- uniter- tests/+ merge/198668
Requires: /code.launchpad .net/~thumper/ juju-core/ juju-run- listener/ +merge/ 198662
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/41210043/
Affected files (+181, -109 lines): uniter/ context. go uniter/ context_ test.go uniter/ export_ test.go uniter/ uniter. go uniter/ uniter_ test.go
A [revision details]
M worker/
M worker/
A worker/
M worker/
M worker/