Skip to content

test(cli): coverage wins (preflight/progress/errors) + smoke-test hardening#16

Merged
aptracebloc merged 1 commit into
developfrom
test/cli-coverage-smoke
Jun 2, 2026
Merged

test(cli): coverage wins (preflight/progress/errors) + smoke-test hardening#16
aptracebloc merged 1 commit into
developfrom
test/cli-coverage-smoke

Conversation

@LukasWodka
Copy link
Copy Markdown
Contributor

Summary

Lifts unit coverage on the cheap, cluster-free 0%-functions and hardens the CI smoke test. Independent of the modality stack — branches off develop.

Coverage

  • progress_test.go: NewProgress non-TTY → NoOp; isTTY false cases.
  • coverage_test.go (cli): printPushPreflight renders the key facts; exitError.Error/Code; runClusterInfo → exit 3 on a bad kubeconfig.
  • watcherr_test.go (submit): WatchError.Unwrap + IsWatchError (exit-9 vs exit-8 mapping).

Per-package after: cli 61% · cluster 84% · push 84% · schema 81% · submit 66%. Remaining gaps are the real-I/O seams (SPDYExecutor.Exec, PortForwardJobsManager, NewClientset) — covered by the integration-harness PR.

Smoke test

CI now runs ingest validate on committed fixtures (valid → 0, missing-images → 2) + dataset push --help against the built binary — catches schema/validation/wiring regressions without a cluster.

Test plan

go build/vet/test ./... green; fixtures verified locally (good→0, bad→2).

🤖 Generated with Claude Code

@LukasWodka
Copy link
Copy Markdown
Contributor Author

👋 Heads-up — Code review queue is at 19 / 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.)

Lifts unit coverage on cheap-to-test, previously-0% functions that
don't need a cluster, and beefs up the CI smoke test to exercise the
real binary's schema validation.

- progress_test.go: NewProgress on a non-TTY returns the no-op sink;
  isTTY false cases.
- coverage_test.go (cli): printPushPreflight renders the key facts;
  exitError.Error/Code; runClusterInfo exits 3 on a bad kubeconfig.
- watcherr_test.go (submit): WatchError.Unwrap + IsWatchError
  classification (drives the exit-9 vs exit-8 mapping).
- CI smoke test now runs `ingest validate` against committed fixtures
  (valid -> exit 0; missing-images -> exit 2) + `dataset push --help`,
  so a schema/validation/wiring regression is caught on the built
  binary without a cluster.

Per-package coverage after: cli 61%, cluster 84%, push 84%, schema 81%,
submit 66%. The remaining gaps are the real-I/O seams
(SPDYExecutor.Exec, PortForwardJobsManager, NewClientset) — those need
a real cluster and are covered by the integration harness (separate PR).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 now green; all checks pass (Build x5, Lint, Test). Coverage additions are substantive (preflight content, exitError Code/Error, runClusterInfo exit-3, progress NoOp/isTTY, WatchError classification), and the CI smoke step now exercises ingest validate on a valid + invalid spec against the real binary. LGTM.

@aptracebloc aptracebloc merged commit 132eca1 into develop Jun 2, 2026
8 checks passed
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