Skip to content

test: fix tests for windows - #714

Merged
miparnisari merged 1 commit into
mainfrom
windows-support
Aug 7, 2026
Merged

test: fix tests for windows#714
miparnisari merged 1 commit into
mainfrom
windows-support

Conversation

@miparnisari

@miparnisari miparnisari commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/decode/decoder.go 70.00% 2 Missing and 1 partial ⚠️
pkg/backupformat/encoder.go 75.00% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@miparnisari
miparnisari marked this pull request as ready for review August 7, 2026 18:32

@tstirrat15 tstirrat15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, see comments

Comment on lines +52 to +53
unixNotExistPattern = regexp.MustCompile(`no\s+such\s+file\s+or\s+directory`)
windowsNotExistPattern = regexp.MustCompile(`The\s+system\s+cannot\s+find\s+the\s+file\s+specified\.`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another potential approach here is to use runtime.GOOS == "windows" and then have separate test paths. I think it's fine as is if you don't feel like doing that.

Comment thread .gitattributes
Comment on lines +3 to +7
# Schema/validation-file fixtures are parsed byte-for-byte (schema DSL error
# messages report line/column position), and several tests compare their
# contents against hardcoded LF string literals. Without this, Windows
# checkouts with core.autocrlf=true would convert them to CRLF and break
# both the comparisons and the reported positions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting

@miparnisari
miparnisari merged commit 6c05522 into main Aug 7, 2026
14 checks passed
@miparnisari
miparnisari deleted the windows-support branch August 7, 2026 18:57
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows, TestBulkDeleteForcing and TestBulkDeleteManyForcing are flaky

3 participants