Skip to content

fix(tests): add Label("cluster") to rehydration tests with K8s assertions#25

Merged
chadcrum merged 1 commit into
dcm-project:mainfrom
chadcrum:add-cluster-label-policy-test
Jun 18, 2026
Merged

fix(tests): add Label("cluster") to rehydration tests with K8s assertions#25
chadcrum merged 1 commit into
dcm-project:mainfrom
chadcrum:add-cluster-label-policy-test

Conversation

@chadcrum

Copy link
Copy Markdown
Contributor

Summary

  • Adds Label("cluster") to 5 rehydration It() blocks that contain inline if kubectlAvailable K8s assertions but were missing the label
  • The critical fix is rehydration_policy_test.go:148 ("policy change causes rehydration to select different provider") — no secondary protection (disruptive/requirePodman), actively fails in CI against mock backend on a reachable cluster
  • The remaining 4 tests in rehydration_policy_test.go and rehydration_failover_test.go are hardened for consistency (already protected by disruptive + requirePodman)

Test plan

  • Ran E2E suite against mock backend with --label-filter 'rehydration && !cluster' — previously failing policy test is now correctly excluded
  • Verified labeled tests still execute when cluster label is included

🤖 Generated with Claude Code

…ions

Tests using inline `if kubectlAvailable` guards to assert K8s resource
state were missing Label("cluster"), causing failures in CI when running
against a mock backend on a reachable cluster. The guard is always true
in that environment since kubectlAvailable checks cluster reachability
and provider namespaces are hardcoded non-empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
@chadcrum chadcrum merged commit 753eb6f into dcm-project:main Jun 18, 2026
3 checks passed
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.

2 participants