From 6392b1fa8682f36a9d6d79a2514f35d60132956f Mon Sep 17 00:00:00 2001 From: yhaliaw <43424755+yhaliaw@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:28:25 +0800 Subject: [PATCH] Fix test --- src/charm.py | 2 ++ tests/integration/test_charm_with_proxy.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/charm.py b/src/charm.py index aa7911c6a..c399b8109 100755 --- a/src/charm.py +++ b/src/charm.py @@ -368,6 +368,8 @@ def _on_start(self, _event: StartEvent) -> None: Args: event: Event of starting the charm. """ + self._check_and_update_dependencies() + runner_manager = self._get_runner_manager() self.unit.status = MaintenanceStatus("Starting runners") diff --git a/tests/integration/test_charm_with_proxy.py b/tests/integration/test_charm_with_proxy.py index 32698f4c0..db47ac86a 100644 --- a/tests/integration/test_charm_with_proxy.py +++ b/tests/integration/test_charm_with_proxy.py @@ -126,7 +126,7 @@ async def app_with_aproxy_fixture( @pytest.mark.asyncio @pytest.mark.abort_on_fail -async def test_usage_of_aproxy(model: Model, app_with_aproxy: Application, proxy: str) -> None: +async def test_usage_of_aproxy(model: Model, app_with_aproxy: Application) -> None: """ arrange: A working application with one runner using aproxy configured for a proxy server. act: Run curl in the runner. @@ -142,8 +142,8 @@ async def test_usage_of_aproxy(model: Model, app_with_aproxy: Application, proxy unit, runner_name, "curl http://canonical.com", - env={"http_proxy": proxy, "https_proxy": proxy}, ) + assert return_code == 0 return_code, stdout = await run_in_lxd_instance(