-
Notifications
You must be signed in to change notification settings - Fork 138
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
CBG-4236: Create SG log files on startup with 0644 permission bits set #7128
Conversation
…heck logic, since we use the actual log files to validate that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worthwhile to write a test for the following circumstances? I'm specifically concerned that the errors will be opaque if Sync Gateway is started with invalid configuration since each logger will error separately. If this is unclear, separating the directory creation from log file validation might be worthwhile.
logFilePath
is specified as a file instead of a directorylogFilePath
is not actually writeable. This test might only work on linux by changing permissions to read only.
Added test for 'not a directory', non-writable test already covered with Real-world error at startup time:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but the tests need to pass on windows - the "not a directory" message is different and the file descriptor from os.Create needs to be closed so the temporary directory can be removed.
Will approve after that is done.
…ith 0644 permission bits set (#7128)
CBG-4236
Creates log files on startup with
0644
permission bits set.Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/000/