Skip to content

Commit

Permalink
test: adjust the unit tests to include set_can_connect
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Jan 4, 2023
1 parent 814ed63 commit d2c05cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/canonical/operator/#egg=ops
ops >= 1.5.3
2 changes: 2 additions & 0 deletions tests/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def test_gosherve_layer(self):
self.assertEqual(self.harness.charm._gosherve_layer(), expected)

def test_on_config_changed(self):
# Let the harness know that the container's Pebble is available on the socket
self.harness.set_can_connect("gosherve", True)
plan = self.harness.get_container_pebble_plan("gosherve")
self.assertEqual(plan.to_dict(), {})
# Trigger a config-changed hook. Since there was no plan initially, the
Expand Down

0 comments on commit d2c05cb

Please sign in to comment.