diff --git a/letsencrypt_apache/tests/util.py b/letsencrypt_apache/tests/util.py index 0b0367505..be4ca823e 100644 --- a/letsencrypt_apache/tests/util.py +++ b/letsencrypt_apache/tests/util.py @@ -54,10 +54,11 @@ def dir_setup(test_dir="debian_apache_2_4/two_vhost_80", def setup_ssl_options( - config_dir, mod_ssl_conf=constants.MOD_SSL_CONF): + config_dir, src=constants.MOD_SSL_CONF_SRC, + dest=constants.MOD_SSL_CONF_DEST): """Move the ssl_options into position and return the path.""" - option_path = os.path.join(config_dir, "options-ssl.conf") - shutil.copyfile(mod_ssl_conf, option_path) + option_path = os.path.join(config_dir, dest) + shutil.copyfile(src, option_path) return option_path @@ -75,7 +76,10 @@ def get_apache_configurator( config=mock.MagicMock( apache_server_root=config_path, apache_le_vhost_ext=constants.CLI_DEFAULTS["le_vhost_ext"], + backup_dir=backups, config_dir=config_dir, + temp_checkpoint_dir=os.path.join(work_dir, "temp_checkpoints"), + in_progress_dir=os.path.join(backups, "IN_PROGRESS"), work_dir=work_dir), name="apache", version=version) diff --git a/letsencrypt_nginx/tests/util.py b/letsencrypt_nginx/tests/util.py index caa9de14e..ea1ef0a6c 100644 --- a/letsencrypt_nginx/tests/util.py +++ b/letsencrypt_nginx/tests/util.py @@ -20,7 +20,8 @@ class NginxTest(unittest.TestCase): # pylint: disable=too-few-public-methods "etc_nginx", "letsencrypt_nginx.tests") self.ssl_options = apache_util.setup_ssl_options( - self.config_dir, constants.MOD_SSL_CONF) + self.config_dir, constants.MOD_SSL_CONF_SRC, + constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, "etc_nginx") @@ -44,8 +45,15 @@ def get_nginx_configurator( backups = os.path.join(work_dir, "backups") config = configurator.NginxConfigurator( - config=mock.MagicMock(nginx_server_root=config_path, - config_dir=config_dir, work_dir=work_dir), + config=mock.MagicMock( + nginx_server_root=config_path, + le_vhost_ext="-le-ssl.conf", + config_dir=config_dir, + work_dir=work_dir, + backup_dir=backups, + temp_checkpoint_dir=os.path.join(work_dir, "temp_checkpoints"), + in_progress_dir=os.path.join(backups, "IN_PROGRESS"), + ), name="nginx", version=version) config.prepare()