Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Fix test failure on Windows caused by nil sys in mock FileInfo #39

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

masih
Copy link
Member

@masih masih commented Jul 22, 2021

Fix test failure caused by panic when checking if a file is hidden in
Windows. The hidden check uses FileInfo.Sys(). In tests the object is
a mock and that call returns nil. Regardless of mocking, we should
check for nil since according to docs that function can return nil.

Run go mod tidy.

Relates to:

Fix test failure caused by `panic` when checking if a file is hidden in
Windows. The hidden check uses `FileInfo.Sys()`. In tests the object is
a mock and that call returns `nil`. Regardless of mocking, we should
check for `nil` since according to docs that function can return `nil`.

Run `go mod tidy`.

Relates to:
- #34
@welcome
Copy link

welcome bot commented Jul 22, 2021

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

@marten-seemann marten-seemann merged commit ac44de8 into master Jul 22, 2021
@masih masih deleted the masih/fix-win-test-fail branch July 22, 2021 09:17
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 11, 2023
…-fail

Fix test failure on Windows caused by nil `sys` in mock `FileInfo`

This commit was moved from ipfs/go-ipfs-files@ac44de8
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.

2 participants