Skip to content

fix(go): preserve failing test location context#994

Merged
aeppling merged 1 commit intortk-ai:developfrom
em0t:fix/go-test-failure-context
Apr 3, 2026
Merged

fix(go): preserve failing test location context#994
aeppling merged 1 commit intortk-ai:developfrom
em0t:fix/go-test-failure-context

Conversation

@em0t
Copy link
Copy Markdown
Contributor

@em0t em0t commented Apr 3, 2026

Summary

  • keep file-and-line failure locations in compact rtk go test output instead of dropping them when they do not contain keywords
  • preserve the first follow-up context line after a foo_test.go:42: location entry so assertion messages remain readable
  • add regression coverage for failed test output that uses a location line followed by an indented explanation

Minimal Case

Raw

foo_test.go:42:
    values differ after normalization

Previous RTK

foo (0 passed, 1 failed)
  [FAIL] TestFail

This PR

foo (0 passed, 1 failed)
  [FAIL] TestFail
     foo_test.go:42:
     values differ after normalization

Testing

  • cargo fmt --all
  • cargo clippy --all-targets
  • cargo test --all

Notes

  • cargo clippy --all-targets still reports pre-existing warnings outside this change set

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

@em0t em0t force-pushed the fix/go-test-failure-context branch from 9967235 to 14ee570 Compare April 3, 2026 09:36
@em0t em0t changed the base branch from master to develop April 3, 2026 09:36
@em0t em0t force-pushed the fix/go-test-failure-context branch from 14ee570 to 03e53a9 Compare April 3, 2026 09:39
Signed-off-by: em0t <10153971+em0t@users.noreply.github.com>
@em0t em0t force-pushed the fix/go-test-failure-context branch from 03e53a9 to 374fe64 Compare April 3, 2026 10:09
@em0t
Copy link
Copy Markdown
Contributor Author

em0t commented Apr 3, 2026

Could a maintainer please approve and run workflows so CI can start for review?

@aeppling aeppling self-assigned this Apr 3, 2026
@aeppling aeppling added the awaiting-information Waiting for reporter to provide more info label Apr 3, 2026
@aeppling
Copy link
Copy Markdown
Contributor

aeppling commented Apr 3, 2026

Valid and clean, thanks for contributing

@aeppling aeppling merged commit 1481bc5 into rtk-ai:develop Apr 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-information Waiting for reporter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants