From 62a8ec3d5dcf81f00eb0118f4258a4dc1e7487a9 Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Tue, 10 Nov 2026 05:39:08 -0500 Subject: [PATCH 1/4] VM-only HA tests --- tests/integration/charm/helpers.py | 43 +++ .../test_async_replication_backups_ceph.py | 196 ++++++++++ ...test_async_replication_dead_dc_recovery.py | 351 ++++++++++++++++++ .../test_async_replication_outage.py | 160 ++++++++ tests/integration/helpers/juju.py | 28 +- 5 files changed, 777 insertions(+), 1 deletion(-) create mode 100644 tests/integration/charm/high_availability/test_async_replication_backups_ceph.py create mode 100644 tests/integration/charm/high_availability/test_async_replication_dead_dc_recovery.py create mode 100644 tests/integration/charm/high_availability/test_async_replication_outage.py diff --git a/tests/integration/charm/helpers.py b/tests/integration/charm/helpers.py index cfe9e097..dc3c4e2f 100644 --- a/tests/integration/charm/helpers.py +++ b/tests/integration/charm/helpers.py @@ -57,6 +57,40 @@ class RoleAttributeValue(Enum): ALL_DATABASES = 3 +def consumer_alias_exists(juju: jubilant.Juju, app_name: str, label: str) -> bool: + """Whether *app*'s leader holds a consumer-side alias for *label*. + + A consumed-secret alias is not listed by ``secret-ids`` (which returns only + owned secrets), so ``get_async_secret_labels`` can't see it. Probe it directly: + ``secret-get --label`` returns content when the alias exists and errors with + ``consumer label "