mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Reduce warnings while testing by setting mock _openssl_version.
This commit is contained in:
parent
04a64ed451
commit
3f6f267b2f
3 changed files with 7 additions and 3 deletions
|
|
@ -199,6 +199,7 @@ class ApacheConfigurator(common.Installer):
|
|||
"""
|
||||
version = kwargs.pop("version", None)
|
||||
use_parsernode = kwargs.pop("use_parsernode", False)
|
||||
openssl_version = kwargs.pop("openssl_version", None)
|
||||
super(ApacheConfigurator, self).__init__(*args, **kwargs)
|
||||
|
||||
# Add name_server association dict
|
||||
|
|
@ -224,7 +225,7 @@ class ApacheConfigurator(common.Installer):
|
|||
self.parser = None
|
||||
self.parser_root = None
|
||||
self.version = version
|
||||
self._openssl_version = None
|
||||
self._openssl_version = openssl_version
|
||||
self.vhosts = None
|
||||
self.options = copy.deepcopy(self.OS_DEFAULTS)
|
||||
self._enhance_func = {"redirect": self._enable_redirect,
|
||||
|
|
|
|||
|
|
@ -1784,6 +1784,7 @@ class InstallSslOptionsConfTest(util.ApacheTest):
|
|||
"hash of {0} when it is updated.".format(one_file))
|
||||
|
||||
def test_openssl_version(self):
|
||||
self.config._openssl_version = None
|
||||
some_string_contents = b"""
|
||||
SSLOpenSSLConfCmd
|
||||
OpenSSL configuration command
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@ def get_apache_configurator(
|
|||
config_dir, work_dir, version=(2, 4, 7),
|
||||
os_info="generic",
|
||||
conf_vhost_path=None,
|
||||
use_parsernode=False):
|
||||
use_parsernode=False,
|
||||
openssl_version="1.1.1a"):
|
||||
"""Create an Apache Configurator with the specified options.
|
||||
|
||||
:param conf: Function that returns binary paths. self.conf in Configurator
|
||||
|
|
@ -118,7 +119,8 @@ def get_apache_configurator(
|
|||
except KeyError:
|
||||
config_class = configurator.ApacheConfigurator
|
||||
config = config_class(config=mock_le_config, name="apache",
|
||||
version=version, use_parsernode=use_parsernode)
|
||||
version=version, use_parsernode=use_parsernode,
|
||||
openssl_version=openssl_version)
|
||||
if not conf_vhost_path:
|
||||
config_class.OS_DEFAULTS["vhost_root"] = vhost_path
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue