Skip to content

test: add Network and NetworkContext lifecycle e2e#281

Open
ecv wants to merge 1 commit into
mainfrom
test/network-lifecycle-e2e-rebased
Open

test: add Network and NetworkContext lifecycle e2e#281
ecv wants to merge 1 commit into
mainfrom
test/network-lifecycle-e2e-rebased

Conversation

@ecv

@ecv ecv commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Rebase of #236 onto current main. The original branch was 57 commits behind and its green checks predate the prod-fidelity env (#276); this re-runs the same two tests against the current task test-infra:test-e2e two-cluster env.

What

  • test/e2e/network-crud — bare Network lifecycle: admission, the networking.datumapis.com/network-controller finalizer, clean deletion.
  • test/e2e/network-context-lifecycle — builds the NetworkNetworkBindingNetworkContext chain, drives the context Programmed, asserts the controller derives Ready, asserts the NetworkBinding reaches Ready, then deletes the Network and asserts its finalizer cascade-deletes the owned NetworkContext.

Compatibility with the current env

Both scenarios are control-plane-only and bind to the upstream alias nso-standard the env maps at invocation — no data-plane, no retired-bridge assumptions, nothing to provision downstream. Programmed is patched directly to stand in for the absent provider (same pattern as networkbinding/ready-when-context-is-ready). The NetworkBinding references test-location without creating a Location object; that is correct — networkbinding_controller.go copies the location reference into the NetworkContext and derives its name, it does not look up a Location.

Verification

Supersedes #236.

Add e2e coverage for two NSO-owned reconcile paths that had none, run
against the prod-fidelity two-cluster env (upstream alias nso-standard).

network-crud guards a bare Network's admission, the network-controller
finalizer, and clean deletion. network-context-lifecycle guards the two
behaviors most likely to regress silently: the Programmed to Ready
transition the networkcontext controller derives, and the Network
finalizer's garbage collection of its owned NetworkContext on delete.

Readiness is provider-driven and no provider runs in the harness, so the
lifecycle test patches Programmed directly to stand in for the plugin,
mirroring networkbinding/ready-when-context-is-ready, then asserts the
operator-owned consequences.

Key changes:
- Add test/e2e/network-crud/chainsaw-test.yaml
- Add test/e2e/network-context-lifecycle/chainsaw-test.yaml
@ecv
ecv enabled auto-merge July 15, 2026 02:31
@ecv ecv added the e2e End-to-end / integration test work (Chainsaw, repro, e2e env) label Jul 15, 2026
@ecv
ecv requested a review from 0xmc July 15, 2026 19:11
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.

1 participant