mirror of
https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server.git
synced 2024-08-30 18:22:16 +00:00
Fixed unit tests
This commit is contained in:
parent
cac7dedc6b
commit
1c882c2745
@ -172,8 +172,8 @@ def test_server_xml_access_log(docker_cli, image):
|
||||
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
|
||||
|
||||
xml = parse_xml(container, f'{get_app_install_dir(container)}/conf/server.xml')
|
||||
valve = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert valve.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS')
|
||||
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_4_confluence_before_7_11(docker_cli, image):
|
||||
environment = {
|
||||
@ -186,36 +186,36 @@ def test_server_xml_access_log_default_4_confluence_before_7_11(docker_cli, imag
|
||||
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
|
||||
|
||||
xml = parse_xml(container, f'{get_app_install_dir(container)}/conf/server.xml')
|
||||
valve = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert valve.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS')
|
||||
value = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert value is None
|
||||
|
||||
def test_server_xml_access_log_default_4_confluence_after_7_11(docker_cli, image):
|
||||
environment = {
|
||||
#'ATL_TOMCAT_ACCESS_LOG': Not defined,
|
||||
'ATL_TOMCAT_PROXY_INTERNAL_IPS': '192.168.1.1',
|
||||
'CONFLUENCE_VERSION': "7.11.0"
|
||||
'CONFLUENCE_VERSION': "7.12.0"
|
||||
}
|
||||
|
||||
container = run_image(docker_cli, image, environment=environment)
|
||||
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
|
||||
|
||||
xml = parse_xml(container, f'{get_app_install_dir(container)}/conf/server.xml')
|
||||
valve = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert valve.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS')
|
||||
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_disabled(docker_cli, image):
|
||||
environment = {
|
||||
'ATL_TOMCAT_ACCESS_LOG': 'false',
|
||||
'ATL_TOMCAT_PROXY_INTERNAL_IPS': '192.168.1.1',
|
||||
'CONFLUENCE_VERSION': "7.11.0"
|
||||
'CONFLUENCE_VERSION': "7.11.1"
|
||||
}
|
||||
|
||||
container = run_image(docker_cli, image, environment=environment)
|
||||
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
|
||||
|
||||
xml = parse_xml(container, f'{get_app_install_dir(container)}/conf/server.xml')
|
||||
valve = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert valve.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS')
|
||||
value = xml.find('.//Context/Valve[@className="org.apache.catalina.valves.RemoteIpValve"]')
|
||||
assert value is None
|
||||
|
||||
def test_seraph_defaults(docker_cli, image):
|
||||
container = run_image(docker_cli, image)
|
||||
|
Loading…
Reference in New Issue
Block a user