Set umask in linux_test.go #20

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

tpot commented Jan 25, 2016

Hi there. This particular test fails in my environment as my umask is set to 0022. This patch sets the umask for the test to be something that will allow the test to pass.

Set umask in linux_test.go
Hi there.  This particular test fails in my environment as my umask is set to 0022.  This patch sets the umask for the test to be something that will allow the test to pass.
Owner

natefinch commented Jan 26, 2016

This is not really the best fix for the problem. Setting umask in the code is kind of a no-no. I think the problem is actually that the tests are trying to create a directory with too lax permissions... all they need is 0600, and they're getting created with 0777: https://github.com/natefinch/lumberjack/blob/v2.0/lumberjack_test.go#L638

So, I think just changing that code to use 0600 should fix it for you. You're welcome to give it a try, or I will when I get a few minutes.

Would be great to get this test fixed as it currently fails builds for me also.

Owner

natefinch commented Oct 7, 2016

crud, thanks for pinging me about this. I'll get it fixed ASAP.

natefinch added a commit that referenced this pull request Oct 7, 2016

fix filemode in tests
This fixes #20 by using a more restrictive filemode during tests.

@natefinch natefinch referenced this pull request Oct 7, 2016

Merged

fix filemode in tests #28

@natefinch natefinch closed this in #28 Oct 7, 2016

natefinch added a commit that referenced this pull request Oct 7, 2016

fix filemode in tests (#28)
This fixes #20 by using a more restrictive filemode during tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment