Refactored unit tests

This commit is contained in:
nghazalibeiklar 2022-01-17 13:04:38 +11:00
parent 05930f440b
commit 92aaea5c6d
No known key found for this signature in database
GPG Key ID: 900C605B850D1965
2 changed files with 5 additions and 7 deletions

View File

@ -21,8 +21,6 @@
proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('') }}"
maxHttpHeaderSize="{{ atl_tomcat_maxhttpheadersize | default('8192') }}" />
<Engine name="Standalone"
defaultHost="localhost"
debug="0">

View File

@ -175,11 +175,10 @@ def test_server_xml_access_log(docker_cli, image):
value = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
assert value.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS')
def test_server_xml_access_log_default_ver_lt_7_11(docker_cli, image):
def test_server_xml_access_log_disabled(docker_cli, image):
environment = {
#'ATL_TOMCAT_ACCESS_LOG': Not defined,
'ATL_TOMCAT_ACCESS_LOG': 'false',
'ATL_TOMCAT_PROXY_INTERNAL_IPS': '192.168.1.1',
'CONFLUENCE_VERSION': "7.10.0",
}
container = run_image(docker_cli, image, environment=environment)
@ -189,10 +188,11 @@ def test_server_xml_access_log_default_ver_lt_7_11(docker_cli, image):
value = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
assert value is None
def test_server_xml_access_log_disabled(docker_cli, image):
def test_server_xml_access_log_default_ver_lt_7_11(docker_cli, image):
environment = {
'ATL_TOMCAT_ACCESS_LOG': 'false',
#'ATL_TOMCAT_ACCESS_LOG': Not defined,
'ATL_TOMCAT_PROXY_INTERNAL_IPS': '192.168.1.1',
'CONFLUENCE_VERSION': "7.10.0",
}
container = run_image(docker_cli, image, environment=environment)