From 7e7db4073624d86057353d4f29e995623766a77d Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Wed, 24 Sep 2025 02:22:13 +0300 Subject: [PATCH 1/2] Volume tests --- tests/integration/ha_tests/test_smoke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/ha_tests/test_smoke.py b/tests/integration/ha_tests/test_smoke.py index 3e718522ee..74d04e1bdb 100644 --- a/tests/integration/ha_tests/test_smoke.py +++ b/tests/integration/ha_tests/test_smoke.py @@ -44,7 +44,7 @@ async def test_app_force_removal(ops_test: OpsTest, charm: str): application_name=APPLICATION_NAME, num_units=1, base=CHARM_BASE, - storage={"pgdata": {"pool": "lxd-btrfs", "size": 8046}}, + storage={"pgdata": {"pool": "lxd-btrfs", "size": 8045}}, config={"profile": "testing"}, ) From bbc6b54af89caac6ec4ff15c40bf498543f3637c Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Wed, 24 Sep 2025 03:01:41 +0300 Subject: [PATCH 2/2] Manually deploying --- tests/integration/ha_tests/test_smoke.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/integration/ha_tests/test_smoke.py b/tests/integration/ha_tests/test_smoke.py index 74d04e1bdb..59cefdfece 100644 --- a/tests/integration/ha_tests/test_smoke.py +++ b/tests/integration/ha_tests/test_smoke.py @@ -6,7 +6,6 @@ import logging import pytest -from juju import tag from pytest_operator.plugin import OpsTest from tenacity import Retrying, stop_after_delay, wait_fixed @@ -44,7 +43,7 @@ async def test_app_force_removal(ops_test: OpsTest, charm: str): application_name=APPLICATION_NAME, num_units=1, base=CHARM_BASE, - storage={"pgdata": {"pool": "lxd-btrfs", "size": 8045}}, + storage={"pgdata": {"pool": "lxd-btrfs", "size": 8046}}, config={"profile": "testing"}, ) @@ -143,14 +142,9 @@ async def test_app_resources_conflicts_v3(ops_test: OpsTest, charm: str): garbage_storage = await get_any_deatached_storage(ops_test) logger.info("deploying duplicate application with attached storage") - await ops_test.model.deploy( - charm, - application_name=DUP_APPLICATION_NAME, - num_units=1, - base=CHARM_BASE, - attach_storage=[tag.storage(garbage_storage)], - config={"profile": "testing"}, - ) + deploy_cmd = f"deploy ./{charm} {DUP_APPLICATION_NAME} --model={ops_test.model.info.name} --attach-storage={garbage_storage} --config profile=testing".split() + return_code, _, _ = await ops_test.juju(*deploy_cmd) + assert return_code == 0, "Failed to add unit with storage" # Reducing the update status frequency to speed up the triggering of deferred events. await ops_test.model.set_config({"update-status-hook-interval": "10s"})