From cbf42d8e175f80d7b42d8999b8dbfd2db85cdf92 Mon Sep 17 00:00:00 2001 From: Amanda Hager Lopes de Andrade Katz Date: Tue, 17 Sep 2024 11:00:16 -0300 Subject: [PATCH] fix: fix integration test and change Ingress port to point to NGINX --- src/charm.py | 2 +- tests/integration/test_charm.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/charm.py b/src/charm.py index 999d622..61bd753 100755 --- a/src/charm.py +++ b/src/charm.py @@ -34,7 +34,7 @@ def __init__(self, *args: typing.Any): args: Arguments passed to the CharmBase parent constructor. """ super().__init__(*args) - self.ingress = IngressPerAppRequirer(self, port=29316) + self.ingress = IngressPerAppRequirer(self, port=8080) self.framework.observe(self.on.maubot_pebble_ready, self._on_maubot_pebble_ready) self.framework.observe( self.on.maubot_nginx_pebble_ready, self._on_maubot_nginx_pebble_ready diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 5e844a9..015db51 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -26,10 +26,15 @@ async def test_build_and_deploy( charm = pytestconfig.getoption("--charm-file") maubot_image = pytestconfig.getoption("--maubot-image") assert maubot_image + maubot_nginx_image = pytestconfig.getoption("--maubot-nginx-image") + assert maubot_nginx_image if not charm: charm = await ops_test.build_charm(".") assert ops_test.model - maubot = await ops_test.model.deploy(f"./{charm}", resources={"maubot-image": maubot_image}) + maubot = await ops_test.model.deploy( + f"./{charm}", + resources={"maubot-image": maubot_image, "maubot-nginx-image": maubot_nginx_image}, + ) nginx_ingress_integrator = await ops_test.model.deploy( "nginx-ingress-integrator", channel="edge",