Skip to content

Commit

Permalink
fixed call args in utest
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Oct 12, 2023
1 parent 7887acb commit bf942f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,11 @@ def test_transferred_ca_certs_are_updated(self, patch_exec):
self.harness.add_relation_unit(
relation_id=certificate_transfer_rel_id, remote_unit_name=f"{provider_app}/0"
)
patch_exec.assert_called_once_with(["update-ca-certificates", "--fresh"])
call_list = patch_exec.call_args_list
assert [call.args[0] for call in call_list] == [
["find", "/opt/traefik/juju", "-name", "*.yaml", "-delete"],
["update-ca-certificates", "--fresh"],
]

@patch("ops.model.Container.exec")
@patch("charm._get_loadbalancer_status", lambda **__: "10.0.0.1")
Expand Down

0 comments on commit bf942f8

Please sign in to comment.