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
This is a regression from scenario 6 (or perhaps it's good that it fails?)
MWE:
fromopsimportCharmBasefromscenarioimportContextdeftest_relation_evt():
ctx=Context(CharmBase, meta={"name": "mateusz",
"requires": {"a": {"interface": "b"}}})
rel=Relation("a", interface="b")
rel_cpy=replace(rel, remote_app_data={"foo": "bar"})
ctx.run(ctx.on.relation_changed(rel_cpy), State(relations={rel}))
# scenario.errors.InconsistentScenarioError: Inconsistent scenario.# The following errors were found: cannot emit a_relation_changed because # relation 1 is not in the state.
culprit is this line in the consistency checker:
if event.relation not in state.relations:
... <mark as inconsistent>
Proposed solution:
if event.relation.id not in [r.id for r in state.relations]:
...
The text was updated successfully, but these errors were encountered:
This is a regression from scenario 6 (or perhaps it's good that it fails?)
MWE:
culprit is this line in the consistency checker:
Proposed solution:
The text was updated successfully, but these errors were encountered: