fix: stabilize TestRenderDoctorInteractive to unblock releases#14
Draft
Robert27 wants to merge 1 commit into
Draft
fix: stabilize TestRenderDoctorInteractive to unblock releases#14Robert27 wants to merge 1 commit into
Robert27 wants to merge 1 commit into
Conversation
Use renderPTY (close slave, read until EOF) instead of readPTY with a fixed 200ms deadline. The flaky test caused GoReleaser's go test hook to fail the v0.10.0 release. Co-authored-by: Robert Eggl <robert@eggl.dev>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
v0.10.0release workflow failed in the GoReleaser step after ~4s:GoReleaser runs
go test ./...as abeforehook (see.goreleaser.yaml). The release never reached build/publish — no GitHub Release was created forv0.10.0.Root cause
TestRenderDoctorInteractiveusedreadPTYwith a 200ms read deadline immediately after rendering. The doctor UI writes multiple chunks (header, box, summary), so the read often returned before"go"/"All checks passed"were written.Other interactive tests (
RenderHelp,RenderDedash, etc.) already userenderPTY, which closes the slave PTY and reads until EOF — avoiding the race.Fix
Switch
TestRenderDoctorInteractivetorenderPTY, matching the other interactive tests.Releasing v0.10.0
After merging, re-trigger the release by deleting and re-pushing the tag:
Or cut
v0.10.1from main if you prefer not to move the tag.