Fix default directories on Linux (#6560) (#6562)

* fix default directories

* update changelog

(cherry picked from commit 11e0fa52d0)
This commit is contained in:
Brad Warren 2018-12-05 15:37:06 -08:00 committed by ohemorange
parent 6476663516
commit 1651bdd86b
3 changed files with 35 additions and 2 deletions

View file

@ -2,6 +2,29 @@
Certbot adheres to [Semantic Versioning](http://semver.org/).
## 0.29.1 - master
### Added
*
### Changed
*
### 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.
## 0.29.0 - 2018-12-05
### Added

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'''