Skip to content

Commit

Permalink
Emit takes the relation, not relation ID. (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer authored Dec 19, 2024
1 parent 95adce2 commit 807317c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/unit/test_source_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ def test_consumer_noop_on_source_removal_if_not_leader(self):
rel_id, "prometheus/0", {"grafana_source_host": "1.2.3.4:9090"}
)

self.harness.charm.on["grafana-source"].relation_broken.emit(rel_id)
rel = self.harness.charm.framework.model.get_relation("grafana-source", rel_id) # type: ignore
self.harness.charm.on["grafana-source"].relation_broken.emit(rel)
self.assertEqual(self.harness.charm._stored.source_delete_events, 0)
self.assertEqual(len(self.harness.charm.grafana_consumer.sources_to_delete), 0)

Expand Down

0 comments on commit 807317c

Please sign in to comment.