Skip to content

test: migrate httproute-accepted e2e from infra#237

Merged
ecv merged 2 commits into
mainfrom
test/migrate-httproute-accepted-from-infra
Jul 17, 2026
Merged

test: migrate httproute-accepted e2e from infra#237
ecv merged 2 commits into
mainfrom
test/migrate-httproute-accepted-from-infra

Conversation

@ecv

@ecv ecv commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Adds an httproute-accepted end-to-end test to NSO's local kind harness at test/e2e/httproute-accepted/. It provisions a Gateway and an HTTPRoute and asserts the route reaches Accepted, so downstream traffic programming can proceed.

Why

Per datum-cloud/infra#3006, single-service API-contract tests are moving out of the infra live-env Chainsaw suite into their owning repo's local kind harness, run pre-merge. The gateway.networking.k8s.io HTTPRoute contract is owned by NSO, so it belongs here. Related: datum-cloud/infra#3005.

Approach

The test mirrors the gateway sibling's proven setup on the prod-fidelity harness:

  • a self-signed CA on the downstream cluster (nso-infra),
  • an upstream GatewayClass,
  • a verified Domain (e2e.env.datum.net),
  • a Gateway with HTTP + HTTPS listeners that reaches Accepted,
  • an HTTPRoute + backend EndpointSlice, then an assert that the route is Accepted.

Two details worth calling out, both learned from CI:

Note

Route acceptance is asserted on the per-parent condition (status.parents[].conditions[]), where the Gateway API surfaces it — the HTTPRoute never populates a top-level Accepted condition, so a kubectl wait --for=condition=Accepted can't observe it.

Note

The conditions list asserts both Accepted and ResolvedRefs. Chainsaw matches a bare array positionally and by length, so an expected list carrying only Accepted never matches the route's two-entry status.

Test plan

  • chainsaw lint passes.
  • E2E Tests green end-to-end: httproute-accepted passes in ~7s alongside the rest of the suite. This is verified against a running harness, not just linted.

@ecv

This comment has been minimized.

@ecv
ecv force-pushed the test/migrate-httproute-accepted-from-infra branch from fba3421 to 7d5dfd5 Compare July 13, 2026 20:38
Confirm a user's HTTPRoute is admitted end to end: an HTTPRoute attached
to a Datum gateway reaches the Accepted state, so downstream traffic
programming can proceed.

Per datum-cloud/infra#3006, single-service API-contract tests move out of
the infra live-env Chainsaw suite into their owning repo's local kind
harness, run pre-merge. The gateway.networking.k8s.io HTTPRoute contract
is owned by NSO, so it belongs here.

The test mirrors the gateway sibling's proven setup on the prod-fidelity
harness: a self-signed CA on the downstream cluster, an upstream
GatewayClass, a verified Domain, and a Gateway that reaches Accepted. It
then provisions an HTTPRoute and asserts acceptance on the per-parent
status condition (status.parents[].conditions[]), where the Gateway API
surfaces route acceptance, rather than a top-level condition.
@ecv
ecv force-pushed the test/migrate-httproute-accepted-from-infra branch from 1cc6ea9 to 8fe4348 Compare July 15, 2026 16:26
Chainsaw matches a bare conditions array positionally and by length, so
an expected list with only the Accepted condition never matches the
route's two-entry status (Accepted + ResolvedRefs) and the assert times
out. Assert both conditions, mirroring the gateway sibling.
@ecv ecv added the e2e End-to-end / integration test work (Chainsaw, repro, e2e env) label Jul 15, 2026
@ecv

ecv commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Verified end-to-end now — the draft caveats above are resolved.

The branch was well behind main, so I rebased it onto the current prod-fidelity harness and reworked the test against it. What actually needed fixing, in order:

  1. HTTPRoute acceptance lives on the parent, not the top level. The route is admitted under status.parents[].conditions[]; there's no top-level Accepted condition, so the original kubectl wait --for=condition=Accepted could never observe it and always timed out.
  2. The old manual downstream setup is gone. The prod-fidelity harness now pre-installs Envoy Gateway (in datum-downstream-gateway) and the downstream GatewayClass, so the test no longer copies a CA into envoy-gateway-system or hand-rolls an EnvoyProxy/GatewayClass.
  3. Chainsaw array matching is positional and length-sensitive. Asserting only Accepted never matched the route's two-entry status, so the assert now carries both Accepted and ResolvedRefs, mirroring the gateway sibling.

E2E Tests is green: httproute-accepted passes in ~7s and the rest of the suite is unaffected. Marking ready for review.

@ecv
ecv marked this pull request as ready for review July 15, 2026 21:38
@ecv
ecv requested a review from kevwilliams July 16, 2026 01:20
@ecv
ecv enabled auto-merge July 16, 2026 01:20
@ecv
ecv merged commit f22b2c8 into main Jul 17, 2026
11 checks passed
@ecv
ecv deleted the test/migrate-httproute-accepted-from-infra branch July 17, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e End-to-end / integration test work (Chainsaw, repro, e2e env)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants