Skip to content

[DPE-11496] (PART 11) CI/CD migration to single-kernel: jubilant migration, part 4 - #440

Draft
xavipg003 wants to merge 2 commits into
dpe-11496-10from
dpe-11496-11
Draft

xavipg003 wants to merge 2 commits into
dpe-11496-10from
dpe-11496-11

Conversation

@xavipg003

Copy link
Copy Markdown
Contributor

Description

This PR continues migrating the PostgreSQL integration tests from pytest-operator to jubilant. Builds on #434.

It migrates the HA tests for network failures, WAL recovery and stereo mode with a watcher.

What's included

  • Migrated to jubilant:
    • test_self_healing_3 (VM and K8s, keeping the existing substrate and architecture skips).
    • test_stereo_mode (VM only): shutdown and network isolation of the primary, replica and watcher, multi-cluster watcher relations and production-profile AZ checks.
  • Network and WAL helpers in charm/helpers.py: LXC network cut and restoration, connectivity and isolation checks, Chaos Mesh deployment and policies, and reading/restoring WAL settings and listing WAL files.
  • Local stereo-mode helpers: start_writes and verify_raft_cluster_health become synchronous. Raft password, quorum, member count and watcher membership checks stay unchanged.
  • Fixtures in high_availability/conftest.py: juju_chaos_mesh and juju_wal_settings. Reuses juju_continuous_writes and juju_primary_start_timeout.
  • Move: both test modules move unchanged from ha_tests/ to high_availability/, in a separate commit. Their Spread tasks point to the new paths. Scripts and manifests stay in ha_tests/.

How the migration was done

  • Change only what jubilant needs. Keep the original test names, marks, skips, retry policies, checks and unit selection.
  • Replace ops_test with the synchronous juju fixture and adapt deployment, relations, actions, commands and status reads to jubilant.
  • Reuse the existing synchronous HA helpers for continuous writes, cluster roles, primary selection and health checks.
  • Keep the original try/finally blocks that restore the network and watcher after failures.
  • Preserve the unbounded wait for application removal used by block_until_done=True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant