feat: integrate gotestsum and add test documentation - #59
Conversation
usman-muzaffar555
commented
May 22, 2026
- Replace go test calls with gotestsum for better test output formatting
- Add docs/running-tests.md with Mac and Linux prerequisites and all make targets
- Replace go test calls with gotestsum for better test output formatting - Add docs/running-tests.md with Mac and Linux prerequisites and all make targets
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughStandardize integration tests on gotestsum with a computed GO_TIMEOUT, add make targets and a CI step to install gotestsum, extend kind readiness waits to 300s, remove legacy ct targets from the root Makefile, and add comprehensive test documentation in test/README.md. ChangesTest Runner Migration and Documentation
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/running-tests.md`:
- Around line 61-63: Replace the duplicated explicit go install lines in the
running-tests documentation with a single invocation of the Makefile target by
changing both occurrences of "go install gotest.tools/gotestsum@latest" to "make
-C test install-gotestsum" (as requested), and ensure the Linux section retains
the existing "sudo ln -sf $(go env GOPATH)/bin/gotestsum
/usr/local/bin/gotestsum" line since the Make target only performs the go
install; update the docs/running-tests.md text accordingly so both Mac
prerequisites and the Linux gotestsum section call the Make target instead of
running go install directly.
In `@test/Makefile`:
- Around line 67-69: The GO_TIMEOUT calculation incorrectly assumes TIMEOUT ends
with "m" and miscomputes values like "1h" or "90s"; replace the awk line that
sets GO_TIMEOUT with a small shell parser that inspects $(TIMEOUT), detects the
unit suffix (s,m,h or none), converts the value to a base unit (seconds or
minutes), adds a 10-minute (600s) buffer, and then formats GO_TIMEOUT in a
go-test-compatible duration (e.g., Xm or Xs or HmNs) before exporting it;
specifically, update the expression that sets GO_TIMEOUT to parse TIMEOUT,
handle cases for suffixes "s","m","h" (and a numeric default), perform the
arithmetic to add 600s, and produce a fallback default like "120m" on parse
failure so GO_TIMEOUT and TIMEOUT variables are consistent and safe for go test
-timeout.
- Around line 29-31: Create an ensure-gotestsum prerequisite that verifies
gotestsum is installed and invokes the existing install-gotestsum when missing
(e.g., use a shell check like `command -v gotestsum` and fall back to running
`$(MAKE) install-gotestsum`), then add ensure-gotestsum as a dependency for
every target that uses $(GOTESTSUM_CMD) (specifically test-install, test-nodes,
test-recovery, test-reset, test-failover and any other targets invoking
GOTESTSUM_CMD) so that attempting to run those targets on a fresh environment
triggers the installer instead of failing with "gotestsum: command not found".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 62006c2d-557c-489e-b9a3-3229f4bf60c9
📒 Files selected for processing (2)
docs/running-tests.mdtest/Makefile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test.yaml:
- Around line 95-96: The CI step named "Install gotestsum" currently installs
gotestsum using go install gotest.tools/gotestsum@latest which makes the
workflow non-reproducible; update that step to pin the version by replacing the
`@latest` suffix with the stable release tag `@v1.13.0` so the workflow always
installs gotestsum v1.13.0.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 74f46d47-1b84-488b-9a0a-260f9e55159c
📒 Files selected for processing (1)
.github/workflows/test.yaml
mmols
left a comment
There was a problem hiding this comment.
Looks good. I left a few comments worth tidying to make the documentation complete and connect a few things together.
|
Incorporated all the review comments |
mmols
left a comment
There was a problem hiding this comment.
LGTM - take care of that one comment from CR and feel free to merge.