Skip to content

test(cli): integration harness for the real-I/O seams (kind e2e)#17

Merged
aptracebloc merged 1 commit into
developfrom
test/cli-integration-harness
Jun 2, 2026
Merged

test(cli): integration harness for the real-I/O seams (kind e2e)#17
aptracebloc merged 1 commit into
developfrom
test/cli-integration-harness

Conversation

@LukasWodka
Copy link
Copy Markdown
Contributor

Summary

Adds the missing safety net under the CLI's real-I/O code — the seams the mock-based unit suite can't reach, where every live bug actually lived (SPDYExecutor.Exec is 0% in unit coverage). Independent of the modality stack; branches off develop.

What it adds

  • test/integration/ (//go:build integration):
    • Connectivitycluster.Load + NewClientset against a live API server.
    • StageAndVerify — creates a throwaway namespace + PVC + stage pod, streams a dataset via the real SPDYExecutor tar-over-exec, then exec's back into the pod to confirm the files landed. Covers SPDYExecutor.Exec, StreamLayout, CreateStagePod, WaitForStagePodReady.
  • make test-integration — runs against your ambient kubeconfig (kind, k3d, any dev cluster).
  • .github/workflows/e2e.yml — boots kind + runs the suite, gated to nightly / manual / e2e-labeled PRs (kind boot is too heavy per-PR).

Validation

Ran locally against a live k3d cluster — both tests pass; the stream lands files on the PVC and the exec-back confirms content (filename,label / 001.jpg). Build-tag-gated, so go test ./... and the CI test job are unaffected.

⚠️ The kind CI job itself gets its first real run on the nightly schedule, manual dispatch, or an e2e-labeled PR (can't exercise GH Actions from a local run). Add the e2e label to this PR to smoke it.

Why this matters

This harness covers the exact code path behind the staging↔DEST collision, the validator drift, and the schema skew — all of which were only caught by manual live runs this cycle. Follow-ups (in the harness README): a PortForward fixture and a full dataset push through a real jobs-manager + ingestor to catch cross-component schema skew end-to-end.

🤖 Generated with Claude Code

@LukasWodka
Copy link
Copy Markdown
Contributor Author

👋 Heads-up — Code review queue is at 21 / 8

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

The unit suite mocks every cluster boundary, leaving the highest-risk
code — the SPDYExecutor tar-over-exec stream — at 0% coverage. Every
live bug this project hit (staging<->DEST collision, validator drift,
schema skew) was only findable by running it by hand. This adds an
automated integration harness against a real cluster.

- test/integration/ (//go:build integration):
  * Connectivity — cluster.Load + NewClientset against a live API server.
  * StageAndVerify — creates a throwaway namespace + PVC + stage pod,
    streams a dataset via the REAL push.SPDYExecutor tar-over-exec, then
    exec's back into the pod to confirm the files landed. Covers
    SPDYExecutor.Exec + StreamLayout + CreateStagePod /
    WaitForStagePodReady — the seams with zero unit coverage.
- Makefile: `make test-integration` (ambient kubeconfig; -count=1,
  build-tagged).
- .github/workflows/e2e.yml: boots kind + runs the suite. Gated to
  nightly / manual dispatch / `e2e`-labeled PRs (kind boot is too heavy
  to run per-PR).

Validated locally against a live k3d cluster: both tests pass; the
stream lands files on the PVC and the exec-back confirms content. The
files are build-tag-gated, so normal `go test ./...` and the CI test
job are unaffected. The kind CI job gets its first real run on the
nightly schedule / manual dispatch / an `e2e`-labeled PR.

Follow-ups (test/integration/README.md): a PortForwardJobsManager
fixture; a full `dataset push` through a real jobs-manager + ingestor
(needs the chart in-cluster) to catch cross-component schema skew e2e.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aptracebloc aptracebloc force-pushed the test/cli-integration-harness branch from 705ab2b to df97034 Compare June 2, 2026 11:32
@aptracebloc aptracebloc added the e2e Run the kind e2e integration suite on this PR label Jun 2, 2026
Copy link
Copy Markdown
Contributor

@aptracebloc aptracebloc left a comment

Choose a reason for hiding this comment

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

Rebased onto develop — schema-drift green. Labeled e2e to actually run the harness: Integration (kind) PASSES, so the SPDYExecutor + StreamLayout tar-over-exec seam compiles and works end-to-end on a real kind cluster — the coverage gap I flagged is now closed. All other checks green. LGTM.

@aptracebloc aptracebloc merged commit 18de3c1 into develop Jun 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run the kind e2e integration suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants