Fix default directories on Linux (#6560)

* fix default directories

* update changelog
This commit is contained in:
Brad Warren 2018-12-05 14:52:58 -08:00 committed by GitHub
parent 59a6d94b0a
commit 11e0fa52d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View file

@ -14,13 +14,14 @@ Certbot adheres to [Semantic Versioning](http://semver.org/).
### Fixed
*
* The default work and log directories have been changed back to
/var/lib/letsencrypt and /var/log/letsencrypt respectively.
Despite us having broken lockstep, we are continuing to release new versions of
all Certbot components during releases for the time being, however, the only
package with changes other than its version number was:
*
* certbot
More details about these changes can be found on our GitHub repo.

View file

@ -180,8 +180,8 @@ WINDOWS_DEFAULT_FOLDERS = {
}
LINUX_DEFAULT_FOLDERS = {
'config': '/etc/letsencrypt',
'work': '/var/letsencrypt/lib',
'logs': '/var/letsencrypt/log',
'work': '/var/lib/letsencrypt',
'logs': '/var/log/letsencrypt',
}
def get_default_folder(folder_type):

View file

@ -4,6 +4,7 @@ import unittest
import os
import tempfile
import copy
import sys
import mock
import six
@ -41,6 +42,15 @@ class TestReadFile(TempDirTestCase):
self.assertEqual(contents, test_contents)
class FlagDefaultTest(unittest.TestCase):
"""Tests cli.flag_default"""
def test_linux_directories(self):
if 'fcntl' in sys.modules:
self.assertEqual(cli.flag_default('config_dir'), '/etc/letsencrypt')
self.assertEqual(cli.flag_default('work_dir'), '/var/lib/letsencrypt')
self.assertEqual(cli.flag_default('logs_dir'), '/var/log/letsencrypt')
class ParseTest(unittest.TestCase): # pylint: disable=too-many-public-methods
'''Test the cli args entrypoint'''