Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-certbot-apache for
openSUSE:Factory checked in at 2021-08-11 11:47:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-apache (Old)
and /work/SRC/openSUSE:Factory/.python-certbot-apache.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-apache"
Wed Aug 11 11:47:34 2021 rev:30 rq:911358 version:1.18.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-certbot-apache/python-certbot-apache.changes
2021-07-30 23:22:31.359613601 +0200
+++
/work/SRC/openSUSE:Factory/.python-certbot-apache.new.1899/python-certbot-apache.changes
2021-08-11 11:49:28.521583528 +0200
@@ -1,0 +2,6 @@
+Tue Aug 10 13:49:41 UTC 2021 - Danilo Spinella <[email protected]>
+
+- update to version 1.18.0
+ * sync with the main certbot package
+
+-------------------------------------------------------------------
Old:
----
certbot-apache-1.17.0.tar.gz
New:
----
certbot-apache-1.18.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-certbot-apache.spec ++++++
--- /var/tmp/diff_new_pack.H9Pe9o/_old 2021-08-11 11:49:28.897583076 +0200
+++ /var/tmp/diff_new_pack.H9Pe9o/_new 2021-08-11 11:49:28.901583071 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-certbot-apache
-Version: 1.17.0
+Version: 1.18.0
Release: 0
Summary: Apache plugin for Certbot
License: Apache-2.0
++++++ certbot-apache-1.17.0.tar.gz -> certbot-apache-1.18.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/PKG-INFO
new/certbot-apache-1.18.0/PKG-INFO
--- old/certbot-apache-1.17.0/PKG-INFO 2021-07-06 17:41:26.245873200 +0200
+++ new/certbot-apache-1.18.0/PKG-INFO 2021-08-03 22:14:03.149039500 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.17.0
+Version: 1.18.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/configurator.py
new/certbot-apache-1.18.0/certbot_apache/_internal/configurator.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/configurator.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/configurator.py
2021-08-03 22:12:58.000000000 +0200
@@ -15,9 +15,6 @@
from typing import Set
from typing import Union
-import zope.component
-import zope.interface
-
from acme import challenges
from certbot import errors
from certbot import interfaces
@@ -120,10 +117,7 @@
# TODO: Add directives to sites-enabled... not sites-available.
# sites-available doesn't allow immediate find_dir search even with save()
# and load()
-
[email protected](interfaces.IAuthenticator, interfaces.IInstaller)
[email protected](interfaces.IPluginFactory)
-class ApacheConfigurator(common.Installer):
+class ApacheConfigurator(common.Installer, interfaces.Authenticator):
"""Apache configurator.
:ivar config: Configuration.
@@ -884,7 +878,7 @@
all_names.add(name)
if vhost_macro:
- zope.component.getUtility(interfaces.IDisplay).notification(
+ display_util.notification(
"Apache mod_macro seems to be in use in file(s):\n{0}"
"\n\nUnfortunately mod_macro is not yet supported".format(
"\n ".join(vhost_macro)), force_interactive=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/display_ops.py
new/certbot-apache-1.18.0/certbot_apache/_internal/display_ops.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/display_ops.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/display_ops.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,12 +1,9 @@
"""Contains UI methods for Apache operations."""
import logging
-import zope.component
-
from certbot import errors
-from certbot import interfaces
from certbot.compat import os
-import certbot.display.util as display_util
+from certbot.display import util as display_util
logger = logging.getLogger(__name__)
@@ -26,7 +23,7 @@
# Remove the extra newline from the last entry
if tags_list:
tags_list[-1] = tags_list[-1][:-1]
- code, names = zope.component.getUtility(interfaces.IDisplay).checklist(
+ code, names = display_util.checklist(
"Which VirtualHosts would you like to install the wildcard certificate
for?",
tags=tags_list, force_interactive=True)
if code == display_util.OK:
@@ -34,6 +31,7 @@
return return_vhosts
return []
+
def _reversemap_vhosts(names, vhosts):
"""Helper function for select_vhost_multiple for mapping string
representations back to actual vhost objects"""
@@ -45,6 +43,7 @@
return_vhosts.append(vhost)
return return_vhosts
+
def select_vhost(domain, vhosts):
"""Select an appropriate Apache Vhost.
@@ -62,6 +61,7 @@
return vhosts[tag]
return None
+
def _vhost_menu(domain, vhosts):
"""Select an appropriate Apache Vhost.
@@ -107,7 +107,7 @@
)
try:
- code, tag = zope.component.getUtility(interfaces.IDisplay).menu(
+ code, tag = display_util.menu(
"We were unable to find a vhost with a ServerName "
"or Address of {0}.{1}Which virtual host would you "
"like to choose?".format(domain, os.linesep),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_arch.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_arch.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_arch.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_arch.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,12 +1,8 @@
""" Distribution specific override class for Arch Linux """
-import zope.interface
-
-from certbot import interfaces
from certbot_apache._internal import configurator
from certbot_apache._internal.configurator import OsOptions
[email protected](interfaces.IPluginFactory)
class ArchConfigurator(configurator.ApacheConfigurator):
"""Arch Linux specific ApacheConfigurator override class"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_centos.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_centos.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_centos.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_centos.py
2021-08-03 22:12:58.000000000 +0200
@@ -3,10 +3,7 @@
from typing import cast
from typing import List
-import zope.interface
-
from certbot import errors
-from certbot import interfaces
from certbot import util
from certbot.errors import MisconfigurationError
from certbot_apache._internal import apache_util
@@ -17,7 +14,6 @@
logger = logging.getLogger(__name__)
[email protected](interfaces.IPluginFactory)
class CentOSConfigurator(configurator.ApacheConfigurator):
"""CentOS specific ApacheConfigurator override class"""
@@ -177,8 +173,8 @@
def parse_sysconfig_var(self):
""" Parses Apache CLI options from CentOS configuration file """
defines = apache_util.parse_define_file(self.sysconfig_filep,
"OPTIONS")
- for k in defines:
- self.variables[k] = defines[k]
+ for k, v in defines.items():
+ self.variables[k] = v
def not_modssl_ifmodule(self, path):
"""Checks if the provided Augeas path has argument !mod_ssl"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_darwin.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_darwin.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_darwin.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_darwin.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,12 +1,8 @@
""" Distribution specific override class for macOS """
-import zope.interface
-
-from certbot import interfaces
from certbot_apache._internal import configurator
from certbot_apache._internal.configurator import OsOptions
[email protected](interfaces.IPluginFactory)
class DarwinConfigurator(configurator.ApacheConfigurator):
"""macOS specific ApacheConfigurator override class"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_debian.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_debian.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_debian.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_debian.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,10 +1,7 @@
""" Distribution specific override class for Debian family (Ubuntu/Debian) """
import logging
-import zope.interface
-
from certbot import errors
-from certbot import interfaces
from certbot import util
from certbot.compat import filesystem
from certbot.compat import os
@@ -15,7 +12,6 @@
logger = logging.getLogger(__name__)
[email protected](interfaces.IPluginFactory)
class DebianConfigurator(configurator.ApacheConfigurator):
"""Debian specific ApacheConfigurator override class"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_fedora.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_fedora.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_fedora.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_fedora.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,8 +1,5 @@
""" Distribution specific override class for Fedora 29+ """
-import zope.interface
-
from certbot import errors
-from certbot import interfaces
from certbot import util
from certbot_apache._internal import apache_util
from certbot_apache._internal import configurator
@@ -10,7 +7,6 @@
from certbot_apache._internal.configurator import OsOptions
[email protected](interfaces.IPluginFactory)
class FedoraConfigurator(configurator.ApacheConfigurator):
"""Fedora 29+ specific ApacheConfigurator override class"""
@@ -87,5 +83,5 @@
def _parse_sysconfig_var(self):
""" Parses Apache CLI options from Fedora configuration file """
defines = apache_util.parse_define_file(self.sysconfig_filep,
"OPTIONS")
- for k in defines:
- self.variables[k] = defines[k]
+ for k, v in defines.items():
+ self.variables[k] = v
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_gentoo.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_gentoo.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_gentoo.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_gentoo.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,14 +1,10 @@
""" Distribution specific override class for Gentoo Linux """
-import zope.interface
-
-from certbot import interfaces
from certbot_apache._internal import apache_util
from certbot_apache._internal import configurator
from certbot_apache._internal import parser
from certbot_apache._internal.configurator import OsOptions
[email protected](interfaces.IPluginFactory)
class GentooConfigurator(configurator.ApacheConfigurator):
"""Gentoo specific ApacheConfigurator override class"""
@@ -53,8 +49,8 @@
""" Parses Apache CLI options from Gentoo configuration file """
defines = apache_util.parse_define_file(self.apacheconfig_filep,
"APACHE2_OPTS")
- for k in defines:
- self.variables[k] = defines[k]
+ for k, v in defines.items():
+ self.variables[k] = v
def update_modules(self):
"""Get loaded modules from httpd process, and add them to DOM"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/override_suse.py
new/certbot-apache-1.18.0/certbot_apache/_internal/override_suse.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/override_suse.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/override_suse.py
2021-08-03 22:12:58.000000000 +0200
@@ -1,12 +1,8 @@
""" Distribution specific override class for OpenSUSE """
-import zope.interface
-
-from certbot import interfaces
from certbot_apache._internal import configurator
from certbot_apache._internal.configurator import OsOptions
[email protected](interfaces.IPluginFactory)
class OpenSUSEConfigurator(configurator.ApacheConfigurator):
"""OpenSUSE specific ApacheConfigurator override class"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache/_internal/parser.py
new/certbot-apache-1.18.0/certbot_apache/_internal/parser.py
--- old/certbot-apache-1.17.0/certbot_apache/_internal/parser.py
2021-07-06 17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache/_internal/parser.py
2021-08-03 22:12:58.000000000 +0200
@@ -440,7 +440,11 @@
:type args: list or str
"""
first_dir = aug_conf_path + "/directive[1]"
- self.aug.insert(first_dir, "directive", True)
+ if self.aug.get(first_dir):
+ self.aug.insert(first_dir, "directive", True)
+ else:
+ self.aug.set(first_dir, "directive")
+
self.aug.set(first_dir, dirname)
if isinstance(args, list):
for i, value in enumerate(args, 1):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache.egg-info/PKG-INFO
new/certbot-apache-1.18.0/certbot_apache.egg-info/PKG-INFO
--- old/certbot-apache-1.17.0/certbot_apache.egg-info/PKG-INFO 2021-07-06
17:41:26.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache.egg-info/PKG-INFO 2021-08-03
22:14:03.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.17.0
+Version: 1.18.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache.egg-info/SOURCES.txt
new/certbot-apache-1.18.0/certbot_apache.egg-info/SOURCES.txt
--- old/certbot-apache-1.17.0/certbot_apache.egg-info/SOURCES.txt
2021-07-06 17:41:26.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache.egg-info/SOURCES.txt
2021-08-03 22:14:03.000000000 +0200
@@ -194,8 +194,10 @@
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf
+tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf
+tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf
tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/certbot_apache.egg-info/requires.txt
new/certbot-apache-1.18.0/certbot_apache.egg-info/requires.txt
--- old/certbot-apache-1.17.0/certbot_apache.egg-info/requires.txt
2021-07-06 17:41:26.000000000 +0200
+++ new/certbot-apache-1.18.0/certbot_apache.egg-info/requires.txt
2021-08-03 22:14:03.000000000 +0200
@@ -1,5 +1,5 @@
-acme>=1.17.0
-certbot>=1.17.0
+acme>=1.18.0
+certbot>=1.18.0
python-augeas
setuptools>=39.0.1
zope.component
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/setup.py
new/certbot-apache-1.18.0/setup.py
--- old/certbot-apache-1.17.0/setup.py 2021-07-06 17:41:17.000000000 +0200
+++ new/certbot-apache-1.18.0/setup.py 2021-08-03 22:12:59.000000000 +0200
@@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup
-version = '1.17.0'
+version = '1.18.0'
install_requires = [
# We specify the minimum acme and certbot version as the current plugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/tests/configurator_test.py
new/certbot-apache-1.18.0/tests/configurator_test.py
--- old/certbot-apache-1.17.0/tests/configurator_test.py 2021-07-06
17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/tests/configurator_test.py 2021-08-03
22:12:58.000000000 +0200
@@ -136,7 +136,7 @@
self.assertTrue("debian_apache_2_4/multiple_vhosts/apache" in
self.config.options.server_root)
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_get_all_names(self, mock_getutility):
mock_utility = mock_getutility()
mock_utility.notification = mock.MagicMock(return_value=True)
@@ -145,7 +145,7 @@
"nonsym.link", "vhost.in.rootconf", "www.certbot.demo",
"duplicate.example.com"})
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
@mock.patch("certbot_apache._internal.configurator.socket.gethostbyaddr")
def test_get_all_names_addrs(self, mock_gethost, mock_getutility):
mock_gethost.side_effect = [("google.com", "", ""), socket.error]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/tests/debian_test.py
new/certbot-apache-1.18.0/tests/debian_test.py
--- old/certbot-apache-1.17.0/tests/debian_test.py 2021-07-06
17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/tests/debian_test.py 2021-08-03
22:12:58.000000000 +0200
@@ -9,6 +9,7 @@
from certbot import errors
from certbot.compat import os
+from certbot.tests import util as certbot_util
from certbot_apache._internal import apache_util
from certbot_apache._internal import obj
import util
@@ -68,17 +69,18 @@
self.config.parser.modules["ssl_module"] = None
self.config.parser.modules["mod_ssl.c"] = None
self.assertFalse(ssl_vhost.enabled)
- self.config.deploy_cert(
- "encryption-example.demo", "example/cert.pem", "example/key.pem",
- "example/cert_chain.pem", "example/fullchain.pem")
- self.assertTrue(ssl_vhost.enabled)
- # Make sure that we don't error out if symlink already exists
- ssl_vhost.enabled = False
- self.assertFalse(ssl_vhost.enabled)
- self.config.deploy_cert(
- "encryption-example.demo", "example/cert.pem", "example/key.pem",
- "example/cert_chain.pem", "example/fullchain.pem")
- self.assertTrue(ssl_vhost.enabled)
+ with certbot_util.patch_display_util():
+ self.config.deploy_cert(
+ "encryption-example.demo", "example/cert.pem",
"example/key.pem",
+ "example/cert_chain.pem", "example/fullchain.pem")
+ self.assertTrue(ssl_vhost.enabled)
+ # Make sure that we don't error out if symlink already exists
+ ssl_vhost.enabled = False
+ self.assertFalse(ssl_vhost.enabled)
+ self.config.deploy_cert(
+ "encryption-example.demo", "example/cert.pem",
"example/key.pem",
+ "example/cert_chain.pem", "example/fullchain.pem")
+ self.assertTrue(ssl_vhost.enabled)
def test_enable_site_failure(self):
self.config.parser.root = "/tmp/nonexistent"
@@ -101,9 +103,10 @@
# Get the default 443 vhost
self.config.assoc["random.demo"] = self.vh_truth[1]
- self.config.deploy_cert(
- "random.demo", "example/cert.pem", "example/key.pem",
- "example/cert_chain.pem", "example/fullchain.pem")
+ with certbot_util.patch_display_util():
+ self.config.deploy_cert(
+ "random.demo", "example/cert.pem", "example/key.pem",
+ "example/cert_chain.pem", "example/fullchain.pem")
self.config.save()
# Verify ssl_module was enabled.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/tests/display_ops_test.py
new/certbot-apache-1.18.0/tests/display_ops_test.py
--- old/certbot-apache-1.17.0/tests/display_ops_test.py 2021-07-06
17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/tests/display_ops_test.py 2021-08-03
22:12:58.000000000 +0200
@@ -3,8 +3,8 @@
try:
import mock
-except ImportError: # pragma: no cover
- from unittest import mock # type: ignore
+except ImportError: # pragma: no cover
+ from unittest import mock # type: ignore
from certbot import errors
from certbot.display import util as display_util
@@ -25,7 +25,7 @@
def test_select_no_input(self):
self.assertFalse(select_vhost_multiple([]))
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_select_correct(self, mock_util):
mock_util().checklist.return_value = (
display_util.OK, [self.vhosts[3].display_repr(),
@@ -37,12 +37,13 @@
self.assertTrue(self.vhosts[3] in vhs)
self.assertFalse(self.vhosts[1] in vhs)
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_select_cancel(self, mock_util):
mock_util().checklist.return_value = (display_util.CANCEL, "whatever")
vhs = select_vhost_multiple([self.vhosts[2], self.vhosts[3]])
self.assertFalse(vhs)
+
class SelectVhostTest(unittest.TestCase):
"""Tests for certbot_apache._internal.display_ops.select_vhost."""
@@ -56,12 +57,12 @@
from certbot_apache._internal.display_ops import select_vhost
return select_vhost("example.com", vhosts)
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_successful_choice(self, mock_util):
mock_util().menu.return_value = (display_util.OK, 3)
self.assertEqual(self.vhosts[3], self._call(self.vhosts))
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_noninteractive(self, mock_util):
mock_util().menu.side_effect = errors.MissingCommandlineFlag("no vhost
default")
try:
@@ -69,7 +70,7 @@
except errors.MissingCommandlineFlag as e:
self.assertTrue("vhost ambiguity" in str(e))
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_more_info_cancel(self, mock_util):
mock_util().menu.side_effect = [
(display_util.CANCEL, -1),
@@ -81,16 +82,15 @@
self.assertEqual(self._call([]), None)
@mock.patch("certbot_apache._internal.display_ops.display_util")
- @certbot_util.patch_get_utility()
@mock.patch("certbot_apache._internal.display_ops.logger")
- def test_small_display(self, mock_logger, mock_util, mock_display_util):
+ def test_small_display(self, mock_logger, mock_display_util):
mock_display_util.WIDTH = 20
- mock_util().menu.return_value = (display_util.OK, 0)
+ mock_display_util.menu.return_value = (display_util.OK, 0)
self._call(self.vhosts)
self.assertEqual(mock_logger.debug.call_count, 1)
- @certbot_util.patch_get_utility()
+ @certbot_util.patch_display_util()
def test_multiple_names(self, mock_util):
mock_util().menu.return_value = (display_util.OK, 5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/tests/parser_test.py
new/certbot-apache-1.18.0/tests/parser_test.py
--- old/certbot-apache-1.17.0/tests/parser_test.py 2021-07-06
17:41:15.000000000 +0200
+++ new/certbot-apache-1.18.0/tests/parser_test.py 2021-08-03
22:12:58.000000000 +0200
@@ -105,6 +105,11 @@
for i, match in enumerate(matches):
self.assertEqual(self.parser.aug.get(match), str(i + 1))
+ for name in ("empty.conf", "no-directives.conf"):
+ conf = "/files" + os.path.join(self.parser.root,
"sites-available", name)
+ self.parser.add_dir_beginning(conf, "AddDirectiveBeginning",
"testBegin")
+ self.assertTrue(self.parser.find_dir("AddDirectiveBeginning",
"testBegin", conf))
+
def test_empty_arg(self):
self.assertEqual(None,
self.parser.get_arg("/files/whatever/nonexistent"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.17.0/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf
new/certbot-apache-1.18.0/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf
---
old/certbot-apache-1.17.0/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf
1970-01-01 01:00:00.000000000 +0100
+++
new/certbot-apache-1.18.0/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf
2021-08-03 22:12:58.000000000 +0200
@@ -0,0 +1,5 @@
+<VirtualHost *:80>
+ <Location />
+ Require all denied
+ </Location>
+</VirtualHost>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.17.0/tests/util.py
new/certbot-apache-1.18.0/tests/util.py
--- old/certbot-apache-1.17.0/tests/util.py 2021-07-06 17:41:15.000000000
+0200
+++ new/certbot-apache-1.18.0/tests/util.py 2021-08-03 22:12:58.000000000
+0200
@@ -5,16 +5,16 @@
import augeas
import josepy as jose
+
try:
import mock
-except ImportError: # pragma: no cover
- from unittest import mock # type: ignore
-import zope.component
+except ImportError: # pragma: no cover
+ from unittest import mock # type: ignore
from certbot.compat import os
-from certbot.display import util as display_util
from certbot.plugins import common
from certbot.tests import util as test_util
+from certbot.display import util as display_util
from certbot_apache._internal import configurator
from certbot_apache._internal import entrypoint
from certbot_apache._internal import obj
@@ -69,9 +69,6 @@
vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"):
super().setUp(test_dir, config_root, vhost_root)
- zope.component.provideUtility(display_util.FileDisplay(sys.stdout,
- False))
-
from certbot_apache._internal.parser import ApacheParser
self.aug = augeas.Augeas(
flags=augeas.Augeas.NONE | augeas.Augeas.NO_MODL_AUTOLOAD)