Skip to content

Commit

Permalink
Expand the consistent check tests to match new checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Apr 4, 2024
1 parent 82da906 commit 050ebac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_consistency_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Container,
Event,
Network,
PebbleNotice,
PeerRelation,
Relation,
Secret,
Expand Down Expand Up @@ -65,9 +66,15 @@ def test_workload_event_without_container():
Event("foo-pebble-custom-notice", container=Container("foo")),
_CharmSpec(MyCharm, {}),
)
notice = PebbleNotice("example.com/foo")
assert_consistent(
State(containers=[Container("foo", notices=[notice])]),
Event("foo-pebble-custom-notice", container=Container("foo"), notice=notice),
_CharmSpec(MyCharm, {"containers": {"foo": {}}}),
)
assert_inconsistent(
State(containers=[Container("foo")]),
Event("foo-pebble-custom-notice", container=Container("foo")),
Event("foo-pebble-custom-notice", container=Container("foo"), notice=notice),
_CharmSpec(MyCharm, {"containers": {"foo": {}}}),
)

Expand Down

0 comments on commit 050ebac

Please sign in to comment.