Athens: Test_checkFilePerms fails on Windows

Created on 8 Nov 2018  路  3Comments  路  Source: gomods/athens

Describe the bug
Test_checkFilePerms fails on Windows

Error Message
https://dev.azure.com/gomods/athens/_build/results?buildId=12&view=logs

To Reproduce
Execute tests on Windows

Environment (please complete the following information):

  • OS: Windows Server 2016
bug testing

Most helpful comment

Let's disable until we find a workaround.
According to the docs:

0200 owner writable, 0400 for a read-only file and 0600 for a readable+writable file.

maybe, as a workaround we can have different implementation for win/unix
unix is what we have
win would require 0400
then we would have a switch on runtime.GOOS
same with tests

All 3 comments

os.Chmod(...) doesn't work on Windows so the Test is failing because of that.
The question is, would it be okay to disable the test on Win? Or should we set the permissions manually?

Let's disable until we find a workaround.
According to the docs:

0200 owner writable, 0400 for a read-only file and 0600 for a readable+writable file.

maybe, as a workaround we can have different implementation for win/unix
unix is what we have
win would require 0400
then we would have a switch on runtime.GOOS
same with tests

Can I give a hotfix to this one?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marpio picture marpio  路  4Comments

opinionsDazzle picture opinionsDazzle  路  4Comments

robjloranger picture robjloranger  路  3Comments

marpio picture marpio  路  4Comments

Haiyung picture Haiyung  路  3Comments