From fd66a74a5910f03c6c05a32d76dd8a196cd5314d Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 1 Feb 2021 19:54:10 -0500 Subject: [PATCH] Allow overriding is_newer_tomcat_version() This is needed so we can mock the DogtagInstance class and have control over the version of tomcat. Signed-off-by: Rob Crittenden Reviewed-By: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- ipaserver/install/dogtaginstance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py index a38617129..5cc7f1602 100644 --- a/ipaserver/install/dogtaginstance.py +++ b/ipaserver/install/dogtaginstance.py @@ -294,7 +294,7 @@ class DogtagInstance(service.Service): logger.critical("failed to uninstall %s instance %s", self.subsystem, e) - def __is_newer_tomcat_version(self, default=None): + def _is_newer_tomcat_version(self, default=None): try: result = ipautil.run([paths.BIN_TOMCAT, "version"], capture_output=True) @@ -335,7 +335,7 @@ class DogtagInstance(service.Service): # 9.0.31.0 or later uses 'secret' secretattr = 'requiredSecret' oldattr = 'requiredSecret' - if self.__is_newer_tomcat_version('9.0.31.0'): + if self._is_newer_tomcat_version('9.0.31.0'): secretattr = 'secret' # AJP protocol is at version 1.3. With IPv4/IPv6 split, there might