canonical / ops-scenario

State-transition testing SDK for Operator Framework Juju charms.
Apache License 2.0
10 stars 7 forks source link

Special case the `juju-info` relation #164

Closed kayra1 closed 1 month ago

kayra1 commented 1 month ago

Currently, all charms have the implicit juju-info relation that is not explicitly defined defined in the metadata. the Relation object does not accept this relation since it is not in the metadata file, but the charm should still have access to it.

state = State(relations=[Relation(endpoint="juju-info", interface="juju-info")])
out = context.run(Event('update-status'), state)
scenario.runtime.InconsistentScenarioError: Inconsistent scenario. The following errors were found: relation endpoint juju-info is not declared in metadata.