Skip to content

Support charmcraft extensions in Scenario auto-load #1699

@tonyandrewmeyer

Description

@tonyandrewmeyer

When Scenario autoloads the metadata, it does so via charmcraft.yaml (or the older metadata.yaml, actions.yaml, config.yaml). However, if an extension is being used (such as for the 12-factor apps) then there is additional metadata provided by the extension (for example, see the code in charmcraft).

For the moment, if you're writing tests for these, then you need to explicitly provide the metadata rather than use autoload (for example, you could copy it from the packed charm).

12-factor apps are probably less likely to have additional unit tests, but it would be nice if we did make this easier to do.

It seems likely that we'd need to either run charmcraft to get the generated metadata, or import charmcraft to figure it out. I don't think we would want to try to manually maintain a copy of what metadata each extension adds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    26.04An item we hope to do in the 26.04 cycleneeds designNeeds more thought or a specroadmapAn official roadmap itemtestsRelated to tests or testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions