Skip to content

Meta: consolidated test-coverage roadmap — upgrades, e2e depth, chaos, unit parity, observability #625

Description

@berendt

Background

This meta consolidates every open test-coverage issue into one phased roadmap and extends it with the gaps a fresh repo audit (2026-07-11, main @ 6b526377) surfaced across code, upgrades and real-world usage.

Consolidates (closed in favour of this meta — full scenario specs remain readable in the closed issues):

Related, deliberately NOT consolidated: #420 (bug — root cause stays open there; only its untested acceptance criterion lives here as Phase 2 items), #582/#589/#590/#591 (brownfield meta owns its e2e suite), #610/#614 (guides meta owns guide↔suite coupling).

Already fixed — do not re-file: the 2026-06 pre-production audit (#480/#481) landed the keystone operator helm-upgrade-in-place suite, keystone/c5c3 watch-mapper unit tests, chaos pod-leg CI gating (continue-on-error: false), the deletion-stuck-finalizer chaos test and keystone metrics-collector unit tests.

Current baseline (audited): 85 chainsaw e2e tests (49 keystone, 10 horizon, 6 c5c3, 4 infrastructure, 1 keystone-operator, plus SSO + operator-upgrade suites), 13 chaos tests, 127 Go test files across 4 modules (keystone controller 87.2 %, horizon controller 81.6 %, c5c3 controller 82.0 % unit coverage), tempest for 2025.2/2026.1, helm-unittest at parity for all three charts, zero fuzz tests.

Phase 1 — Inherited quick wins & housekeeping (no new infra)

Failure/recovery e2e (specs in #315):

Observability basics (specs in #316):

Housekeeping:

Phase 2 — Upgrade correctness & data integrity (highest risk)

Phase 3 — Activate dormant coverage & prove enforcement

  • Un-skip the four dormant c5c3 suites: multi-controlplane, admin-password-scoping, db-credential-scoping, deletion-orchestration always SKIP in CI (presence guards; only full-controlplane runs in the e2e-controlplane job) — multi-tenancy and per-CR credential scoping are currently untested at e2e level in CI. Extend the e2e-controlplane job to run them with E2E_REQUIRE_CONTROLPLANE_STACK=true (new, HIGH)
  • NetworkPolicy enforcement: all netpol suites are object-shape only (kindnet ignores NetworkPolicy — self-documented caveat in network-policy-egress). Add a CNI-enabled kind leg (Calico/Cilium) with allow/deny connectivity probes for keystone, horizon and operator egress (Meta: Expand E2E test coverage for Keystone operator #277-P2, new)
  • Flux devstack variant: CONTROLPLANE_OPERATORS=flux (the documented quick-start path using published charts) has zero CI coverage — every job pins external + dev images; cover it (scheduled job is fine) and add the missing docs unit test for docs/quick-start-controlplane.md (new)

Phase 4 — Unit & integration parity (code quality)

Horizon (systematic parity gap vs keystone):

c5c3:

  • Service-account ESO publish path at 0 % (publishServiceAccount, serviceAccountPushSecret, ensureServiceAccountExternalSecret, serviceAccountRemoteKeyFor in reconcile_serviceaccounts.go) — security-relevant credential-distribution flow (new)
  • CredentialRotation controller missing from setupwithmanager_test.go; orphan-deletion error paths (deleteOrphanedKeystone/Horizon 58.3 %); Reconcile unit coverage 43.8 % (new)

Keystone:

  • KeystoneIdentityBackend reconciler error paths (applyRoleAssignment 26.7 %, ensureProtocol 56 %, teardownFederationObjects 52 %) via the existing mockable identity client — these set MappingsReady (new)
  • Federation last-known-good fallbacks (lastKnownGoodSAMLMetadata 50 %, ensureSAMLSPMetadataSecret 53 %, lastKnownGoodProviderMetadata 67 %) — the code that runs exactly when the IdP is down (new)
  • keystoneidentitybackend_types_test.go for the pure helpers (FederationRemoteID, EffectiveProtocolID at 0 %); mapGophercloudError table test (42.9 %) (new)

internal/common:

  • gateway.EnsureHTTPRoute 0 % + gateway is the only apply-path pkg without an integration_test.go; job.DeleteCronJob 0 %; watch.RegisterSecretNameIndex 0 %; 66.7 % error branches in database/deployment/tls (new)

Cross-cutting:

  • CEL envtest parity: only keystone has apiserver-level CEL tests; port the pattern to horizon (8 XValidation markers), c5c3 (14) and internal/common/types (17) for seconds-fast feedback instead of chainsaw-only coverage (new)
  • First fuzz targets (repo has zero): federation_mapping_convert JSON conversion, pysettings Python-literal rendering, config INI rendering, release.ParseRelease, webhook string validators (new)
  • Convention nits: same-named _test.go for reconcile_upgrade.go (keystone) and reconcile_catalog.go (c5c3) — well covered indirectly, but they trip the sub-reconciler convention audit (new)

Phase 5 — E2E depth on existing features (from #277 Phase 2 remainder + #369)

Verified still open — the existing suites test object shape, not effect:

Dropped as since-covered: zero-downtime upgrade under traffic (rolling-update-zero-downtime), Envoy Gateway/HTTPRoute (httproute, gateway-quick-start), SAML/OIDC federation happy paths, brownfield database/cache modes, WATCH_NAMESPACE scoping (namespace-scoped-rbac), PSS-restricted namespace (#317), webhook/CEL rejection matrix (#281), semantic invariants (#314), extraConfig rendering (config-pruning et al.).

Phase 6 — Chaos expansion (scenario specs live in #453 / #550)

Conventions inherited verbatim from #453: one scenario per sub-issue, <target>-<fault-type> naming, server-side partitions, AllInjected gates, pod-UID kill verification, bounded durations, shared diagnostics.sh, explicit test_dirs in ci.yaml.

Phase 7 — Service parity & observability

Horizon (canonical 8-suite floor is met; day-2 usage trails keystone):

  • Horizon e2e for CRD-supported features: autoscaling, logging, missing-secret, config-pruning analogue, image-upgrade/release-upgrade, full gateway-quick-start (smoke-only today) (new)
  • tests/e2e/horizon-operator/network-policy-egress counterpart (the guide enable-horizon-operator-networkpolicy.md exists; the suite does not) (new)
  • Horizon in the e2e-prometheus job: live ServiceMonitor target-Up + Grafana dashboard assertions (keystone-only today), backing enable-horizon-operator-metrics.md (new)
  • Mechanical parity: missing releases/*/test-excludes/horizon.txt; cleanup-images.yaml never prunes horizon-operator packages (new)
  • Horizon emits no Kubernetes Events (no EventRecorder) — feature first, then the events e2e analogue (new, product gap)

c5c3-operator cross-cutting:

  • pod-security-restricted, healthcheck and metrics e2e for the umbrella operator (new)
  • Chart NetworkPolicy template (keystone/horizon charts have one, c5c3 has none) — feature first, then shape + enforcement tests (new, product gap)
  • Grafana dashboard + metric-drift test for c5c3 (keystone/horizon have both) (new, product gap)

Alerts:

  • No PrometheusRule exists anywhere — alerts are a product gap first; once shipped, add alert-shaped tests (rule syntax, drift, e2e-prometheus firing check) (new, product gap)

Phase 8 — Performance & long-running gates (from #277 Phase 4)

Conventions for sub-issues

  • One cohesive feature area per sub-issue; describe scenario, steps, assertions (condition type/status/reason, resource state).
  • Suites live under tests/e2e/<operator>/, tests/e2e/<operator>-operator/, tests/e2e-chaos/, tests/e2e-operator-upgrade/ following the existing three-file convention; respect the chainsaw config contracts (timeouts, parallel: 4) — deviations need justification.
  • Every new chaos/e2e directory must be added to the explicit test_dirs of the matching CI matrix leg (include-regex filtering is a no-op).
  • DoD per sub-issue: green locally against make kind-up, two consecutive flake-free CI runs, docs matrices updated where applicable, no unreviewed new infra in deploy/kind/.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions