From 6dadcddc80458a833b15bd42e4d367988082f330 Mon Sep 17 00:00:00 2001 From: Karolis Eigelis Date: Thu, 20 Feb 2020 23:28:11 +0200 Subject: [PATCH 2/4] adding confluence access log --- config/server.xml.j2 | 2 ++ tests/test_image.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/server.xml.j2 b/config/server.xml.j2 index ecd5c90..b05651d 100644 --- a/config/server.xml.j2 +++ b/config/server.xml.j2 @@ -50,6 +50,8 @@ + + Date: Fri, 21 Feb 2020 14:24:46 +0200 Subject: [PATCH 3/4] adding ATL_ACCESS_LOG flag --- config/server.xml.j2 | 2 ++ tests/test_image.py | 24 +++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/config/server.xml.j2 b/config/server.xml.j2 index b05651d..6dcb2cf 100644 --- a/config/server.xml.j2 +++ b/config/server.xml.j2 @@ -50,8 +50,10 @@ + {% if atl_access_log == 'true' %} + {% endif %} Date: Wed, 26 Feb 2020 10:12:18 +0200 Subject: [PATCH 4/4] align with the other tomcat configuration environment variables --- config/server.xml.j2 | 4 ++-- tests/test_image.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/server.xml.j2 b/config/server.xml.j2 index 6dcb2cf..6835b9a 100644 --- a/config/server.xml.j2 +++ b/config/server.xml.j2 @@ -50,9 +50,9 @@ - {% if atl_access_log == 'true' %} + {% if atl_tomcat_access_log == 'true' %} - + {% endif %} diff --git a/tests/test_image.py b/tests/test_image.py index f109b13..a9bd212 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -283,8 +283,8 @@ def test_confluence_xml_cluster_tcp(docker_cli, image, run_user): def test_confluence_xml_access_log(docker_cli, image, run_user): environment = { - 'ATL_ACCESS_LOG': 'true', - 'ATL_PROXY_INTERNAL_IPS': '192.168.1.1', + 'ATL_TOMCAT_ACCESS_LOG': 'true', + 'ATL_TOMCAT_PROXY_INTERNAL_IPS': '192.168.1.1', } container = run_image(docker_cli, image, user=run_user, environment=environment) _jvm = wait_for_proc(container, get_bootstrap_proc(container)) @@ -292,7 +292,7 @@ def test_confluence_xml_access_log(docker_cli, image, run_user): xml = parse_xml(container, f'{get_app_home(container)}/server.cfg.xml') valve = xml.find(".//Context/Valve[@className='org.apache.catalina.valves.RemoteIpValve']") - assert valve.get('internalProxies') == environment.get('ATL_PROXY_INTERNAL_IPS') + assert valve.get('internalProxies') == environment.get('ATL_TOMCAT_PROXY_INTERNAL_IPS') def test_java_in_run_user_path(docker_cli, image): RUN_USER = 'confluence'