Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests do not compile on Windows #20

Open
Bios-Marcel opened this issue Jul 21, 2023 · 3 comments
Open

Tests do not compile on Windows #20

Bios-Marcel opened this issue Jul 21, 2023 · 3 comments

Comments

@Bios-Marcel
Copy link
Contributor

There are calls to syscall.Umask, which isn't supported on Windows. That test could be moved to a !windows only file.

@gtramontina
Copy link
Owner

Perhaps there's a different way of asserting that the overwritten file has the correct permissions…? I can't recall why exactly that assertion is in place, to be honest. 🤔

@Bios-Marcel
Copy link
Contributor Author

Wouldn't calling FileMode be enough? I am a little confused as to what we need umask for?

@Bios-Marcel
Copy link
Contributor Author

I noticed that there are a couple more tests that don't really work on windows.

#19 also plays into this. When actually using hardlinks, we can't check for correct linkage anymore, as we can't necessarily detect whether we are a hardlink, since hardlinks are basically just normal files, unlike symlinks.

A workaround would be to manipulate the file and see whether both files change.

Additionally, some of the tests make assumptions on filepaths (different separators).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants