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#16561 from jack-w-shaw/remove_series_equals_b…
…undle_checks juju#16561 This is legacy code from the charmstore days. Now we no longer use charmstore, it is impossible (and not supported) for charm urls to have "bundle" in the series field In charmhub, we designate entities to be bundles using the charm origin 'type' field. We can just check this to determine if an entity is a bundle As a drive-by, refactor relevant some tests to remove a redundant method, and fill out some fakes more fully ## 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 - ~[ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~ - [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages ## QA steps ``` $ cat bun.yaml applications: ubuntu: charm: ubuntu $ juju deploy ./bun.yaml Located charm "ubuntu" in charm-hub, channel stable Executing changes: - upload charm ubuntu from charm-hub with architecture=amd64 - deploy application ubuntu from charm-hub Deploy of bundle completed. ``` ``` $ cat bun.yaml applications: ubuntu: charm: cos-lite Located charm "cos-lite" in charm-hub, channel stable ERROR cannot deploy bundle: expected charm, got bundle "cos-lite" ``` ``` $ juju deploy juju-qa-bundle-test Located bundle "juju-qa-bundle-test" in charm-hub, revision 3 Located charm "juju-qa-test" in charm-hub, channel 2.0/stable Located charm "juju-qa-test" in charm-hub, channel latest/candidate Located charm "ntp" in charm-hub, channel stable Located charm "ntp" in charm-hub, channel stable Executing changes: - upload charm juju-qa-test from charm-hub for base [email protected]/stable from channel 2.0/stable with architecture=amd64 - deploy application juju-qa-test from charm-hub on [email protected]/stable with 2.0/stable added resource foo-file - upload charm juju-qa-test from charm-hub for base [email protected]/stable from channel latest/candidate with architecture=amd64 - deploy application juju-qa-test-focal from charm-hub on [email protected]/stable with latest/candidate using juju-qa-test added resource foo-file - upload charm ntp from charm-hub for base [email protected]/stable from channel stable with architecture=amd64 - deploy application ntp from charm-hub on [email protected]/stable with stable - upload charm ntp from charm-hub for base [email protected]/stable from channel stable with architecture=amd64 - deploy application ntp-focal from charm-hub on [email protected]/stable with stable using ntp - add new machine 0 - add new machine 1 - add relation ntp:juju-info - juju-qa-test:juju-info - add relation ntp-focal:juju-info - juju-qa-test-focal:juju-info - add unit juju-qa-test/0 to new machine 0 - add unit juju-qa-test-focal/0 to new machine 1 Deploy of bundle completed. ``` ``` $ juju charm-resources cos-lite No resources to display. ```
- Loading branch information