Summary
Add automated test coverage for the ud CLI (zsh/ud/ud.sh) so changes to subcommands, help text, and command-printing behavior are caught in CI.
Problem
ud is a daily-driver CLI for Go, Rust, Nibiru, quick editor jumps, Docker helpers, and more. It is installed via symlinks.sh → ~/.local/bin/ud.
There is already a Go test file at zsh/ud/ud_test.go, but it is not wired into root CI (.github/workflows/test.yml runs just test → bun test only). The zsh/ud/justfile has its own just test, but that path is easy to forget.
So ud can regress silently unless someone remembers to run Go tests locally in that subdirectory.
Purpose / Rationale
- Protect a heavily used CLI that wraps many workflows
- Catch breakage in help output,
--cmd dry-run behavior, and subcommand routing
- Low cost to run on
ubuntu-latest — existing tests already use bash -c "source ud.sh && ..." pattern
- Align
ud with how other dotfiles automation is already tested (bun tests, config generation tests)
What exists today
zsh/ud/ud_test.go — tests help, ud rs test --cmd, ud go test-short --cmd, ud nibi cfg prod, etc.
zsh/ud/justfile — just test runs go test ./...
- Root
justfile / CI — does not include ud tests
What "good enough" might mean (examples, not a spec)
ud tests run in CI on PRs
- Failures block merge when help text or
--cmd output drifts
- Optional: expand coverage for other subcommands over time
Exact runner choice (fold into just test, separate job, matrix) left open.
Out of scope (for now)
- Testing commands that require external binaries (
nibid, docker, live network)
- Full integration tests against real Nibiru nodes or Docker Desktop
- Rewriting
ud in another language
Acceptance Criteria
Related
Summary
Add automated test coverage for the
udCLI (zsh/ud/ud.sh) so changes to subcommands, help text, and command-printing behavior are caught in CI.Problem
udis a daily-driver CLI for Go, Rust, Nibiru, quick editor jumps, Docker helpers, and more. It is installed viasymlinks.sh→~/.local/bin/ud.There is already a Go test file at
zsh/ud/ud_test.go, but it is not wired into root CI (.github/workflows/test.ymlrunsjust test→bun testonly). Thezsh/ud/justfilehas its ownjust test, but that path is easy to forget.So
udcan regress silently unless someone remembers to run Go tests locally in that subdirectory.Purpose / Rationale
--cmddry-run behavior, and subcommand routingubuntu-latest— existing tests already usebash -c "source ud.sh && ..."patternudwith how other dotfiles automation is already tested (bun tests, config generation tests)What exists today
zsh/ud/ud_test.go— tests help,ud rs test --cmd,ud go test-short --cmd,ud nibi cfg prod, etc.zsh/ud/justfile—just testrunsgo test ./...justfile/ CI — does not includeudtestsWhat "good enough" might mean (examples, not a spec)
udtests run in CI on PRs--cmdoutput driftsExact runner choice (fold into
just test, separate job, matrix) left open.Out of scope (for now)
nibid,docker, live network)udin another languageAcceptance Criteria
ud.shtest suite runs in CI onubuntu-latestjust(exact recipe TBD)Related
~/.local/bin/udlink fromsymlinks.sh)