-
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#18173 from barrettj12/hooks-check
juju#18173 When checking if a local charm has hooks, we were assuming that the zip file would always have a separate entry for the directory `hooks/` and for each of its subfiles. However, this is not the case for charms generated by Charmcraft. A better check is that there exists at least one entry with the prefix `hooks/` that is *not* a directory. ## 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 - ~[ ] 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 Check unit tests pass. ``` go test ./api/client/charms -check.f charmsMockSuite ``` Pack the `departer` charm (`testcharms/charms/departer`) and verify that it can be deployed.
- Loading branch information
Showing
2 changed files
with
114 additions
and
18 deletions.
There are no files selected for viewing
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