diff --git a/tests/integration/ha_tests/test_rollback_to_master_label.py b/tests/integration/ha_tests/test_rollback_to_master_label.py index 8043b4aa8a..c76fc7a1f9 100644 --- a/tests/integration/ha_tests/test_rollback_to_master_label.py +++ b/tests/integration/ha_tests/test_rollback_to_master_label.py @@ -17,6 +17,7 @@ APPLICATION_NAME, CHARM_BASE, DATABASE_APP_NAME, + METADATA, get_leader_unit, get_primary, get_unit_by_index, @@ -108,8 +109,11 @@ async def test_fail_and_rollback(ops_test, continuous_writes) -> None: application = ops_test.model.applications[DATABASE_APP_NAME] + resources = {"postgresql-image": METADATA["resources"]["postgresql-image"]["upstream-source"]} + application = ops_test.model.applications[DATABASE_APP_NAME] + logger.info("Refresh the charm") - await application.refresh(path=fault_charm) + await application.refresh(path=fault_charm, resources=resources) logger.info("Get first upgrading unit") # Highest ordinal unit always the first to upgrade. diff --git a/tests/integration/ha_tests/test_upgrade_to_primary_label.py b/tests/integration/ha_tests/test_upgrade_to_primary_label.py index a3835370c1..e8d3e42e64 100644 --- a/tests/integration/ha_tests/test_upgrade_to_primary_label.py +++ b/tests/integration/ha_tests/test_upgrade_to_primary_label.py @@ -16,6 +16,7 @@ CHARM_BASE, CHARM_SERIES, DATABASE_APP_NAME, + METADATA, get_leader_unit, get_primary, get_unit_by_index, @@ -100,8 +101,11 @@ async def test_upgrade(ops_test, continuous_writes) -> None: local_charm = await ops_test.build_charm(".") application = ops_test.model.applications[DATABASE_APP_NAME] + resources = {"postgresql-image": METADATA["resources"]["postgresql-image"]["upstream-source"]} + application = ops_test.model.applications[DATABASE_APP_NAME] + logger.info("Refresh the charm") - await application.refresh(path=local_charm) + await application.refresh(path=local_charm, resources=resources) logger.info("Get first upgrading unit") # Highest ordinal unit always the first to upgrade.