Skip to content

[DPE-11198] test(watcher): cover the watcher handler and bump to 16.3.14 (3/3) - #276

Draft
marceloneppel wants to merge 2 commits into
watcher-2-wire-handlerfrom
watcher-3-tests-version
Draft

[DPE-11198] test(watcher): cover the watcher handler and bump to 16.3.14 (3/3)#276
marceloneppel wants to merge 2 commits into
watcher-2-wire-handlerfrom
watcher-3-tests-version

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

Stacks on #274 and #275.

Solution

  • Ports the VM charm's watcher unit tests (test_watcher_relation.py) over the substrate-parameterised harness: the Raft address composition (including the invalid-port guard), the raft-status active gate, the joined/changed/broken event flows, the leader-only relation-data handout (cluster-name, raft-secret-id, raft-partner-addrs, raft-port, patroni-cas, standby-clusters, tls-enabled), the per-unit address and availability-zone publishing, the secret update on credential rotation, and the secret get-or-create paths. The joined-leader flow asserts the full cluster-information share (secret grant to the watcher relation + relation-data update), and the no-secret path defers, matching the charm's tests plus the gaps they left.
  • Every test skips on the k8s substrate: the watcher relation exists only in the VM charm's metadata.
  • Bumps the library version to 16.3.14. This is the last PR of the watcher wave to merge in the lib; the charm adoption PRs pin this branch's tip commit.

@marceloneppel
marceloneppel changed the base branch from 16/edge to watcher-2-wire-handler September 4, 2026 21:54
….14 (3/3)

Ports the VM charm's watcher relation unit tests over the substrate
parameterised harness: the Raft address composition (including the
invalid-port guard), the raft-status active gate, the joined/changed/broken
event flows, the leader-only relation-data handout, the per-unit address
and availability-zone publishing, the secret update on credential
rotation, and the secret get-or-create paths.

Every test skips on the k8s substrate: the watcher relation exists only
in the VM charm's metadata.

Bumps the library version to 16.3.14.
…ow-up)

Strengthens the ported tests per the faithfulness review:
- The joined-leader flow now asserts the full cluster-information share:
  the secret grant to the watcher relation and the relation-data update
  (the source test's grant/_update_relation_data assertions).
- Adds the missing joined no-secret test: a failed secret creation
  defers the event.
- The leader handout test now also asserts raft-secret-id,
  raft-partner-addrs (fresh units_ips) and standby-clusters, which the
  port had dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant