You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request juju#16694 from SimonRichardson/bootstrap-controller-charm-infra
juju#16694
~~Requires juju#16689 to land first.~~
----
This is another peeled-off piece from the bootstrap worker controller charm deployment. This infrastructure will define how we can deploy a controller charm with better test coverage than in the `cmd/jujud/agent` package.
The premise of this change is to provide two deployers; IAAS and CAAS. Depending on the dependency engine configuration the deployer will selected based on the appropriate manifold. Work to integrate it into the bootstrap worker will be done once this has landed.
Each deployer has a common set of tasks called by the `PopulateControllerCharm` function. This takes a `ControllerCharmDeployer` as a dependency, accumulates all the dependencies that can't be calculated up front, and then feeds them to either the local or charmhub deploy methods. The code is based upon the `controller.go` found in the `cmd/jujud/agent` package, with a lot of additional tests. To improve coverage, some of the dependencies are swapped out for interface variations.
---
I've tried to reduce the changes as much as possible by breaking off the changes required to land this (see: juju#16689). Most if not all the code is the mock files required for testing.
## Checklist
<!-- If an item is not applicable, use `~strikethrough~`. -->
- [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
As this is infrastructural work, there currently isn't a manual test.
```sh
$ go test -v ./internal/bootstrap -v
```
## Links
**Jira card:** JUJU-5137
0 commit comments