Skip to content

fix(go): preserve go test list output - #4430

Open
nightcityblade wants to merge 1 commit into
rtk-ai:developfrom
nightcityblade:fix/go-test-list-output
Open

nightcityblade wants to merge 1 commit into
rtk-ai:developfrom
nightcityblade:fix/go-test-list-output

Conversation

@nightcityblade

Copy link
Copy Markdown

Summary

  • Stop injecting -json when go test receives -list, so RTK preserves the requested test, benchmark, and fuzz target listing.
  • Cover separate-value and = forms for both single- and double-dash spellings.

Closes #4419.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk go test -list TestErrorf fmt and rtk go test --list=TestErrorf fmt output inspected

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

@CLAassistant

CLAassistant commented Oct 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working go labels Oct 3, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes the rtk go test wrapper so that passing -list/--list (with or without =) no longer forces JSON output, preserving go's plain test/benchmark/fuzz target listing. Adds a dedicated should_skip_test_json helper covering both dash spellings and value forms, plus unit tests.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4419


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@nightcityblade
nightcityblade force-pushed the fix/go-test-list-output branch from 21f472b to cd5add9 Compare October 3, 2026 15:55
@pszymkowiak

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! Before we can review and merge this, the CLA needs to be signed. The CLAassistant bot left the link above, it only takes a minute. Once it's signed we'll pick the review up.

@KuSh KuSh added the needs-cla label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go needs-cla

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk go test -list prints "No tests found" while the stream lists the tests

4 participants