Compare commits
3 Commits
test-windo
...
travis-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcb85becb9 | ||
|
|
ca1573ea32 | ||
|
|
8af28d83a6 |
229
.travis.yml
229
.travis.yml
@@ -41,240 +41,11 @@ extended-test-suite: &extended-test-suite
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Main test suite
|
|
||||||
- stage: "Test"
|
|
||||||
python: "2.7"
|
|
||||||
env: ACME_SERVER=pebble TOXENV=integration
|
|
||||||
<<: *not-on-master
|
|
||||||
|
|
||||||
# As documented at
|
|
||||||
# https://docs.travis-ci.com/user/build-stages/#how-to-define-build-stages,
|
|
||||||
# the previous stage will be automatically applied to all subsequent jobs
|
|
||||||
# until a new stage is defined.
|
|
||||||
|
|
||||||
# This job is always executed, including on master
|
|
||||||
- python: "3.8"
|
|
||||||
env: TOXENV=py38-cover FYI="py38 tests + code coverage"
|
|
||||||
|
|
||||||
- python: "3.7"
|
|
||||||
env: TOXENV=lint
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "3.5"
|
|
||||||
env: TOXENV=mypy
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "2.7"
|
|
||||||
# Ubuntu Trusty or older must be used because the oldest version of
|
|
||||||
# cryptography we support cannot be compiled against the version of
|
|
||||||
# OpenSSL in Xenial or newer.
|
|
||||||
dist: trusty
|
|
||||||
env: TOXENV='py27-{acme,apache,apache-v2,certbot,dns,nginx}-oldest'
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "2.7"
|
|
||||||
env: TOXENV=py27
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "3.5"
|
|
||||||
env: TOXENV=py35
|
|
||||||
<<: *not-on-master
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=apache_compat
|
|
||||||
services: docker
|
|
||||||
addons:
|
|
||||||
<<: *not-on-master
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=le_auto_xenial
|
|
||||||
services: docker
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "2.7"
|
|
||||||
env: TOXENV=apacheconftest-with-pebble
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "2.7"
|
|
||||||
env: TOXENV=nginxroundtrip
|
|
||||||
<<: *not-on-master
|
|
||||||
|
|
||||||
# Extended test suite on cron jobs and pushes to tested branches other than master
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=nginx_compat
|
|
||||||
services: docker
|
|
||||||
addons:
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
env:
|
env:
|
||||||
- TOXENV=travis-test-farm-apache2
|
- TOXENV=travis-test-farm-apache2
|
||||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
||||||
<<: *extended-test-suite
|
<<: *extended-test-suite
|
||||||
- python: "3.7"
|
|
||||||
env:
|
|
||||||
- TOXENV=travis-test-farm-leauto-upgrades
|
|
||||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
|
||||||
git:
|
|
||||||
depth: false # This is needed to have the history to checkout old versions of certbot-auto.
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env:
|
|
||||||
- TOXENV=travis-test-farm-certonly-standalone
|
|
||||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env:
|
|
||||||
- TOXENV=travis-test-farm-sdists
|
|
||||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env: TOXENV=py37 CERTBOT_NO_PIN=1
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration-certbot-oldest
|
|
||||||
# Ubuntu Trusty or older must be used because the oldest version of
|
|
||||||
# cryptography we support cannot be compiled against the version of
|
|
||||||
# OpenSSL in Xenial or newer.
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration-certbot-oldest
|
|
||||||
# Ubuntu Trusty or older must be used because the oldest version of
|
|
||||||
# cryptography we support cannot be compiled against the version of
|
|
||||||
# OpenSSL in Xenial or newer.
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration-nginx-oldest
|
|
||||||
# Ubuntu Trusty or older must be used because the oldest version of
|
|
||||||
# cryptography we support cannot be compiled against the version of
|
|
||||||
# OpenSSL in Xenial or newer.
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "2.7"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration-nginx-oldest
|
|
||||||
# Ubuntu Trusty or older must be used because the oldest version of
|
|
||||||
# cryptography we support cannot be compiled against the version of
|
|
||||||
# OpenSSL in Xenial or newer.
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.6"
|
|
||||||
env: TOXENV=py36
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env: TOXENV=py37
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.5"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.5"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.6"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.6"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.7"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration
|
|
||||||
sudo: required
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.8"
|
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.8"
|
|
||||||
env: ACME_SERVER=boulder-v2 TOXENV=integration
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=le_auto_jessie
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=le_auto_centos6
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=le_auto_oraclelinux6
|
|
||||||
services: docker
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- sudo: required
|
|
||||||
env: TOXENV=docker_dev
|
|
||||||
services: docker
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages: # don't install nginx and apache
|
|
||||||
- libaugeas0
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- stage: "Snap"
|
|
||||||
sudo: required
|
|
||||||
env: SNAP=true TOXENV=integration-external,apacheconftest-external-with-pebble
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- nginx-light
|
|
||||||
snaps:
|
|
||||||
- name: snapcraft
|
|
||||||
channel: stable
|
|
||||||
confinement: classic
|
|
||||||
- name: lxd
|
|
||||||
channel: stable
|
|
||||||
git:
|
|
||||||
# By default, Travis clones the repo to a depth of 50 commits which can
|
|
||||||
# break the ability to use `git describe` to set the version of the
|
|
||||||
# snap. This setting removes the --depth flag from git commands solving
|
|
||||||
# this problem. See
|
|
||||||
# https://docs.travis-ci.com/user/customizing-the-build#git-clone-depth
|
|
||||||
# for more info.
|
|
||||||
depth: false
|
|
||||||
deploy:
|
|
||||||
# This section relies on credentials stored in a SNAP_TOKEN environment
|
|
||||||
# variable in Travis. See
|
|
||||||
# https://docs.travis-ci.com/user/deployment/snaps/ for more info.
|
|
||||||
# This credential has a maximum lifetime of 1 year and the current
|
|
||||||
# credential will expire on 4/22/2021. The value of SNAP_TOKEN will
|
|
||||||
# need to be updated to use a new credential before then to prevent
|
|
||||||
# automated deploys from breaking. Remembering to do this is also
|
|
||||||
# tracked by https://github.com/certbot/certbot/issues/7931.
|
|
||||||
'on':
|
|
||||||
# Deploy on release tags or nightly runs from any branch. We only try
|
|
||||||
# to deploy from the certbot/certbot repo to prevent errors if forks
|
|
||||||
# of this repo try to run tests.
|
|
||||||
all_branches: true
|
|
||||||
condition: -n $TRAVIS_TAG || $TRAVIS_EVENT_TYPE = cron
|
|
||||||
repo: certbot/certbot
|
|
||||||
provider: snap
|
|
||||||
snap: certbot_*.snap
|
|
||||||
channel: edge
|
|
||||||
# skip_cleanup is needed to prevent Travis from deleting the snaps we
|
|
||||||
# just built and tested. See
|
|
||||||
# https://docs.travis-ci.com/user/deployment#uploading-files-and-skip_cleanup.
|
|
||||||
skip_cleanup: true
|
|
||||||
<<: *extended-test-suite
|
|
||||||
|
|
||||||
# container-based infrastructure
|
# container-based infrastructure
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ class ApacheConfigurator(common.Installer):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/apache2",
|
challenge_location="/etc/apache2",
|
||||||
|
bin=None
|
||||||
)
|
)
|
||||||
|
|
||||||
def option(self, key):
|
def option(self, key):
|
||||||
@@ -145,7 +146,7 @@ class ApacheConfigurator(common.Installer):
|
|||||||
"""
|
"""
|
||||||
opts = ["enmod", "dismod", "le_vhost_ext", "server_root", "vhost_root",
|
opts = ["enmod", "dismod", "le_vhost_ext", "server_root", "vhost_root",
|
||||||
"logs_root", "challenge_location", "handle_modules", "handle_sites",
|
"logs_root", "challenge_location", "handle_modules", "handle_sites",
|
||||||
"ctl"]
|
"ctl", "bin"]
|
||||||
for o in opts:
|
for o in opts:
|
||||||
# Config options use dashes instead of underscores
|
# Config options use dashes instead of underscores
|
||||||
if self.conf(o.replace("_", "-")) is not None:
|
if self.conf(o.replace("_", "-")) is not None:
|
||||||
@@ -194,6 +195,8 @@ class ApacheConfigurator(common.Installer):
|
|||||||
"(Only Ubuntu/Debian currently)")
|
"(Only Ubuntu/Debian currently)")
|
||||||
add("ctl", default=DEFAULTS["ctl"],
|
add("ctl", default=DEFAULTS["ctl"],
|
||||||
help="Full path to Apache control script")
|
help="Full path to Apache control script")
|
||||||
|
add("bin", default=DEFAULTS["bin"],
|
||||||
|
help="Full path to apache2/httpd binary")
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
"""Initialize an Apache Configurator.
|
"""Initialize an Apache Configurator.
|
||||||
@@ -269,18 +272,25 @@ class ApacheConfigurator(common.Installer):
|
|||||||
"""
|
"""
|
||||||
if self._openssl_version:
|
if self._openssl_version:
|
||||||
return self._openssl_version
|
return self._openssl_version
|
||||||
# Step 1. Check for LoadModule directive
|
# Step 1. Determine the location of ssl_module
|
||||||
try:
|
try:
|
||||||
ssl_module_location = self.parser.modules['ssl_module']
|
ssl_module_location = self.parser.modules['ssl_module']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if warn_on_no_mod_ssl:
|
if warn_on_no_mod_ssl:
|
||||||
logger.warning("Could not find ssl_module; not disabling session tickets.")
|
logger.warning("Could not find ssl_module; not disabling session tickets.")
|
||||||
return None
|
return None
|
||||||
if not ssl_module_location:
|
if ssl_module_location:
|
||||||
logger.warning("Could not find ssl_module; not disabling session tickets.")
|
# Possibility A: ssl_module is a DSO
|
||||||
return None
|
ssl_module_location = self.parser.standard_path_from_server_root(ssl_module_location)
|
||||||
ssl_module_location = self.parser.standard_path_from_server_root(ssl_module_location)
|
else:
|
||||||
# Step 2. Grep in the .so for openssl version
|
# Possibility B: ssl_module is statically linked into Apache
|
||||||
|
if self.option("bin"):
|
||||||
|
ssl_module_location = self.option("bin")
|
||||||
|
else:
|
||||||
|
logger.warning("ssl_module is statically linked but --apache-bin is "
|
||||||
|
"missing; not disabling session tickets.")
|
||||||
|
return None
|
||||||
|
# Step 2. Grep in the binary for openssl version
|
||||||
contents = self._open_module_file(ssl_module_location)
|
contents = self._open_module_file(ssl_module_location)
|
||||||
if not contents:
|
if not contents:
|
||||||
logger.warning("Unable to read ssl_module file; not disabling session tickets.")
|
logger.warning("Unable to read ssl_module file; not disabling session tickets.")
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ class ArchConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/httpd/conf",
|
challenge_location="/etc/httpd/conf",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class CentOSConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/httpd/conf.d",
|
challenge_location="/etc/httpd/conf.d",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def config_test(self):
|
def config_test(self):
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ class DarwinConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/apache2/other",
|
challenge_location="/etc/apache2/other",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class DebianConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=True,
|
handle_modules=True,
|
||||||
handle_sites=True,
|
handle_sites=True,
|
||||||
challenge_location="/etc/apache2",
|
challenge_location="/etc/apache2",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def enable_site(self, vhost):
|
def enable_site(self, vhost):
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class FedoraConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/httpd/conf.d",
|
challenge_location="/etc/httpd/conf.d",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def config_test(self):
|
def config_test(self):
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class GentooConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/apache2/vhosts.d",
|
challenge_location="/etc/apache2/vhosts.d",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _prepare_options(self):
|
def _prepare_options(self):
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ class OpenSUSEConfigurator(configurator.ApacheConfigurator):
|
|||||||
handle_modules=False,
|
handle_modules=False,
|
||||||
handle_sites=False,
|
handle_sites=False,
|
||||||
challenge_location="/etc/apache2/vhosts.d",
|
challenge_location="/etc/apache2/vhosts.d",
|
||||||
|
bin=None,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1772,12 +1772,22 @@ class InstallSslOptionsConfTest(util.ApacheTest):
|
|||||||
AH02556: "SSLOpenSSLConfCmd %s %s" applied to %s
|
AH02556: "SSLOpenSSLConfCmd %s %s" applied to %s
|
||||||
OpenSSL 1.0.2g 1 Mar 2016
|
OpenSSL 1.0.2g 1 Mar 2016
|
||||||
"""
|
"""
|
||||||
|
# ssl_module as a DSO
|
||||||
self.config.parser.modules['ssl_module'] = '/fake/path'
|
self.config.parser.modules['ssl_module'] = '/fake/path'
|
||||||
with mock.patch("certbot_apache._internal.configurator."
|
with mock.patch("certbot_apache._internal.configurator."
|
||||||
"ApacheConfigurator._open_module_file") as mock_omf:
|
"ApacheConfigurator._open_module_file") as mock_omf:
|
||||||
mock_omf.return_value = some_string_contents
|
mock_omf.return_value = some_string_contents
|
||||||
self.assertEqual(self.config.openssl_version(), "1.0.2g")
|
self.assertEqual(self.config.openssl_version(), "1.0.2g")
|
||||||
|
|
||||||
|
# ssl_module statically linked
|
||||||
|
self.config._openssl_version = None
|
||||||
|
self.config.parser.modules['ssl_module'] = None
|
||||||
|
self.config.options['bin'] = '/fake/path/to/httpd'
|
||||||
|
with mock.patch("certbot_apache._internal.configurator."
|
||||||
|
"ApacheConfigurator._open_module_file") as mock_omf:
|
||||||
|
mock_omf.return_value = some_string_contents
|
||||||
|
self.assertEqual(self.config.openssl_version(), "1.0.2g")
|
||||||
|
|
||||||
def test_current_version(self):
|
def test_current_version(self):
|
||||||
self.config.version = (2, 4, 10)
|
self.config.version = (2, 4, 10)
|
||||||
self.config._openssl_version = '1.0.2m'
|
self.config._openssl_version = '1.0.2m'
|
||||||
@@ -1799,12 +1809,21 @@ class InstallSslOptionsConfTest(util.ApacheTest):
|
|||||||
self.assertEqual(self.config.openssl_version(), None)
|
self.assertEqual(self.config.openssl_version(), None)
|
||||||
self.assertTrue("Could not find ssl_module" in mock_log.call_args[0][0])
|
self.assertTrue("Could not find ssl_module" in mock_log.call_args[0][0])
|
||||||
|
|
||||||
|
# When no ssl_module is present at all
|
||||||
self.config._openssl_version = None
|
self.config._openssl_version = None
|
||||||
self.config.parser.modules['ssl_module'] = None
|
self.assertTrue("ssl_module" not in self.config.parser.modules)
|
||||||
with mock.patch("certbot_apache._internal.configurator.logger.warning") as mock_log:
|
with mock.patch("certbot_apache._internal.configurator.logger.warning") as mock_log:
|
||||||
self.assertEqual(self.config.openssl_version(), None)
|
self.assertEqual(self.config.openssl_version(), None)
|
||||||
self.assertTrue("Could not find ssl_module" in mock_log.call_args[0][0])
|
self.assertTrue("Could not find ssl_module" in mock_log.call_args[0][0])
|
||||||
|
|
||||||
|
# When ssl_module is statically linked but --apache-bin not provided
|
||||||
|
self.config._openssl_version = None
|
||||||
|
self.config.options['bin'] = None
|
||||||
|
self.config.parser.modules['ssl_module'] = None
|
||||||
|
with mock.patch("certbot_apache._internal.configurator.logger.warning") as mock_log:
|
||||||
|
self.assertEqual(self.config.openssl_version(), None)
|
||||||
|
self.assertTrue("ssl_module is statically linked but" in mock_log.call_args[0][0])
|
||||||
|
|
||||||
self.config.parser.modules['ssl_module'] = "/fake/path"
|
self.config.parser.modules['ssl_module'] = "/fake/path"
|
||||||
with mock.patch("certbot_apache._internal.configurator.logger.warning") as mock_log:
|
with mock.patch("certbot_apache._internal.configurator.logger.warning") as mock_log:
|
||||||
# Check that correct logger.warning was printed
|
# Check that correct logger.warning was printed
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
*
|
* Allow session tickets to be disabled in Apache when mod_ssl is statically linked.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user