forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#16157 from anvial/meterstatus-controllerconfig
juju#16157 This PR injects controllerConfigService in agent/meterstatus facade. Also, it refactors agent/uniter facade to mock controllerConfigGetter function in unit-tests. To inject this controllerConfigService (controllerConfigGetter), the PR extract `ControllerConfig()` function from `UniStateShim` in common.UnitStateAPI. To do this there was a need to inject `controllerConfigGetter` in several facades where common APIs used: - `agent/provisioner` - `agent/upgrader` - `client/client` - `client/machinemanager` - `client/modelmanager` - `client/modelupdater` ## Checklist - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing ## QA steps ```sh go test github.com/juju/juju/apiserver/facades/agent/meterstatus/... -gocheck.v go test github.com/juju/juju/apiserver/facades/agent/uniter/... -gocheck.v go test github.com/juju/juju/apiserver/facades/agent/provisioner/... -gocheck.v go test github.com/juju/juju/apiserver/facades/agent/upgrader/... -gocheck.v go test github.com/juju/juju/apiserver/facades/client/client/... -gocheck.v go test github.com/juju/juju/apiserver/facades/client/machinemanager/... -gocheck.v go test github.com/juju/juju/apiserver/facades/client/modelmanager/... -gocheck.v go test github.com/juju/juju/apiserver/facades/client/modelupgrader/... -gocheck.v juju bootstrap lxd lxd juju add-model test juju deploy ubuntu -n 3 ```
- Loading branch information
Showing
33 changed files
with
447 additions
and
108 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 2 additions & 18 deletions
20
...ent/meterstatus/mocks/meterstatus_mock.go → ...gent/meterstatus/meterstatus_mock_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.