mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
Fix test dirs chmods errors.
Stragely, when run on digitalocean jessie x64 droplet (as root), the following error were produced before this fix: ====================================================================== ERROR: test_add_name_vhost (letsencrypt.client.plugins.apache.tests.configurator_test.TwoVhost80Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/lets-encrypt-preview/letsencrypt/client/plugins/apache/tests/configurator_test.py", line 35, in setUp self.ssl_options) File "/root/lets-encrypt-preview/letsencrypt/client/plugins/apache/tests/util.py", line 76, in get_apache_configurator version) File "/root/lets-encrypt-preview/letsencrypt/client/plugins/apache/configurator.py", line 96, in __init__ self.verify_setup() File "/root/lets-encrypt-preview/letsencrypt/client/plugins/apache/configurator.py", line 938, in verify_setup self.config.config_dir, constants.CONFIG_DIRS_MODE, uid) File "/root/lets-encrypt-preview/letsencrypt/client/le_util.py", line 37, in make_or_verify_dir "permissions or owner" % directory) LetsEncryptClientError: /tmp/tmp1wYWIMconfig exists, but does not have the proper permissions or owner
This commit is contained in:
parent
93cdad120d
commit
803bb9595c
2 changed files with 8 additions and 0 deletions
|
|
@ -37,6 +37,10 @@ def dir_setup(test_dir="debian_apache_2_4/two_vhost_80"):
|
|||
config_dir = tempfile.mkdtemp("config")
|
||||
work_dir = tempfile.mkdtemp("work")
|
||||
|
||||
os.chmod(temp_dir, constants.CONFIG_DIRS_MODE)
|
||||
os.chmod(config_dir, constants.CONFIG_DIRS_MODE)
|
||||
os.chmod(work_dir, constants.CONFIG_DIRS_MODE)
|
||||
|
||||
test_configs = pkg_resources.resource_filename(
|
||||
"letsencrypt.client.plugins.apache.tests", "testdata/%s" % test_dir)
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ def dir_setup(test_dir="debian_nginx/two_vhost_80"):
|
|||
config_dir = tempfile.mkdtemp("config")
|
||||
work_dir = tempfile.mkdtemp("work")
|
||||
|
||||
os.chmod(temp_dir, constants.CONFIG_DIRS_MODE)
|
||||
os.chmod(config_dir, constants.CONFIG_DIRS_MODE)
|
||||
os.chmod(work_dir, constants.CONFIG_DIRS_MODE)
|
||||
|
||||
test_configs = pkg_resources.resource_filename(
|
||||
"letsencrypt.client.plugins.nginx.tests", test_dir)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue