Skip to content

test(e2e): add suite coverage for areas 12-14 and console gaps - #417

Merged
jsell-rh merged 1 commit into
mainfrom
squizzi/reconcile-e2e-testing-specs
Oct 2, 2026
Merged

jsell-rh merged 1 commit into
mainfrom
squizzi/reconcile-e2e-testing-specs

Conversation

@squizzi

@squizzi squizzi commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

What

Add comprehensive e2e test coverage for three new core test areas (ManagedCluster registration, gateway release promotion, admin API validation) and two console browser test areas (cluster typeahead + CLI install docs, fleet dashboard promotion map).

Highlights

  • Areas 12–14 in e2e-openshell.sh: ManagedCluster registration idempotency, control-plane gRPC identity rejection, reconnect convergence, gateway release promotion, reconciled status write-back for releases/networks, admin-only user inventory boundary, unknown-phase validation
  • Console areas 7 & 11 in e2e-console.sh: cluster typeahead listing + install docs link (target=_blank, https, safe rel); fleet dashboard promotion map renders from live BFF payload with error-state handling
  • Shared helpers in lib.sh: e2e_json_field (moved from browser-lib.sh), e2e_http_status, e2e_poll_resource_status, status predicates; environment variables for registrar client, multi-cluster fleet opt-in, fleet dashboard URL, platform qualification flags; e2e_truthy gate helper
  • Driver enhancement in drivers/kind.sh: acquire_registrar_token for control-plane client-credentials identity
  • Verified on local Kind: long run 90 passed / 2 failed (1 pre-existing area-9 flake; 1 promotion assertion since corrected); short mode 20/0; console unit test 56/0; shell unit tests pass
  • Two divergences recorded: D-E2E-DELETE-CP (gateway DELETE needs CP, so delete-while-disconnected is infeasible), D-E2E-DEGRADED (failed rollout keeps last-good pods serving, stays Running not Degraded)

Scope

E2E test suite expansion only; no API server, control plane, or UI feature changes (all underlying features already implemented). Browser test areas 7/11 are code-complete + unit-tested; CI covers the browser paths. Multi-cluster (E2E-15) and qualification (E2E-20) remain deferred.

Close the e2e coverage gaps #413 opened by renumbering the core suite to
14 areas. The underlying API/control-plane/UI features already existed;
only the e2e scenarios were missing.

e2e-openshell.sh (new long-only areas 12-14):
- Area 12: ManagedCluster self-registration (idempotency, missing-role
  403, name-collision 409, unregistered-cluster 400), the gRPC watch
  identity boundary (UNAUTHENTICATED / PERMISSION_DENIED /
  INVALID_ARGUMENT via grpcurl), and reconnect convergence.
- Area 13: gateway release promotion (observed_release_id advances to
  the serving release; a failed rollout never moves off the last-good
  release) and reconciled release/network status assertions.
- Area 14: admin-only /v1/users boundary and unknown-phase rejection.

e2e-console.sh: cluster typeahead + CLI install-docs link (area 7) and
fleet-dashboard promotion (area 11, skip-gated on E2E_FLEET_DASHBOARD_URL).

Support: shared helpers in lib.sh (e2e_json_field moved here from
browser-lib.sh, e2e_poll_resource_status, status predicates, registrar /
multi-cluster / qualification env defaults) and acquire_registrar_token
in drivers/kind.sh. Fixed a set -e abort where a bare
VAR=$(e2e_wait_gateway_running|e2e_poll_resource_status) assignment killed
the whole run on timeout instead of recording a failure.

Verified on a local Kind cluster (long run 90 passed; short 20/0; console
unit test 56/0; all shell unit tests pass). Two behaviours diverge from
the spec and are recorded in RECONCILE.md rather than forced:
- Gateway DELETE performs service-account cleanup through the control
  plane and returns 503 while it is down, so "delete while disconnected"
  is infeasible; area 12 covers create-convergence instead.
- A failed rollout keeps the last-good workload serving and stays
  Running (not Degraded); area 13 asserts the never-moves-to-bad safety
  invariant.

Multi-cluster (E2E_MULTICLUSTER) and extended qualification stay deferred
behind their flags, pending infrastructure.

Assisted-by: Claude Opus 4.8
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 0056d418-a9ed-4429-addd-fd92006d5083

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

HyperShell environment destroyed

This ephemeral OpenShift environment has been destroyed. Comment /pr-extend to redeploy it.

@hypershell-delivery

hypershell-delivery Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Amber review: comment

Amber review

Status: Complete

View the submitted review.

@hypershell-delivery hypershell-delivery Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

This is a well-scoped, test-only expansion of the shell e2e suite (new API areas 12-14, console areas 7 and 11, shared helpers). The new code is correct under set -euo pipefail (the helpers that legitimately return non-zero are guarded with || true), passes bash -n, keeps secrets out of logged commands, and records its two divergences honestly; I have only minor cosmetic nits, but there is a material cross-PR contract conflict the maintainers should resolve before both land.

Findings

No Blocker/Critical/Major issues in this PR's own code. Two Minor documentation/cosmetic nits are filed inline.

Cross-PR coordination

A material contract conflict exists with #412 (gateway provisioning by placement intent). #412 removes cluster_id from GatewayCreateRequest and replaces it with a required placement intent that the server resolves into a cluster (see its model_gateway_create_request.go and handler.go/cluster_reference.go placement resolver). This PR's area 12e asserts the opposite, current contract: a gateway create with an empty or unregistered cluster_id returns 400 naming cluster_id, and it posts create bodies that carry cluster_id directly. Under #412 those requests would fail for a different reason (missing placement), and the 400 would name placement.network/placement.provider, not cluster_id; the shared e2e_gateway_create_body helper (used here by the reconnect and promotion areas) also still emits cluster_id. The console area 7 "Select a cluster" typeahead assertion rests on the same cluster-selection UX that #412 reworks toward placement availability.

The maintainers need to decide a merge order and ownership: if #412 lands first, area 12e, the e2e_gateway_create_body bodies, and the console cluster-typeahead assertion in this PR must be rewritten to the placement-intent contract; if this PR lands first, #412 must update these e2e assertions as part of its change. This requires a joint decision rather than an independent merge.

Previous concerns

No prior Amber findings exist in the review history for this PR, so there is nothing to reconcile.

Findings Summary (ordered by severity, highest first)

  1. [Minor] e2e-console.sh section-divider comments still say "8" and "9" after the areas were renumbered to 9 and 10 - Readability (L873, L943)
  2. [Minor] Area 13c leading comment asserts the gateway "must go Degraded," contradicting the implemented (and documented D-E2E-DEGRADED) accept-either-phase behavior - Doc Consistency (L2682-L2683)

Convention Checklist

Convention Result
No panic() in production code N/A (shell test code)
No secrets in logs / echoed commands Pass
Safe under set -euo pipefail (non-zero-returning helpers guarded) Pass
bash -n clean Pass
Test Diff Scrutiny (no silently flipped pre-existing assertions) Pass
Opt-in/infra-gated paths record skips, not false passes Pass

Comment thread tests/e2e/e2e-console.sh
@@ -793,7 +873,7 @@ sep
# ── 8. Delete gateway ────────────────────────────────────────────────────

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: this section-divider comment still reads 8. Delete gateway, but the area was renumbered - the e2e_area call just below is "9. Gateway Deletion...". The next divider at L943 has the same drift (9. vs e2e_area "10. ..."). Cosmetic only; worth syncing the comment numbers so the dividers match the printed area numbers.

fi

# Failed rollout: repoint to a bad (unpullable) release. The gateway must go
# Degraded and keep the last-good observed_release_id (B), never report the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: this leading comment states the gateway "must go Degraded and keep the last-good observed_release_id," but the implemented assertion (and the fuller comment a few lines down, plus the recorded D-E2E-DEGRADED divergence) accepts Degraded OR Running-on-last-good. Suggest softening this top comment to "must never report the bad release as serving" so it matches the actual check and avoids implying a Degraded-only requirement.

@rh-amarin
rh-amarin added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 2, 2026
@jsell-rh
jsell-rh added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 562e73e Oct 2, 2026
29 checks passed
@jsell-rh
jsell-rh deleted the squizzi/reconcile-e2e-testing-specs branch October 2, 2026 16:11
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