Merged in fix-context-path (pull request #174)

Fix context path in cfg.xml

* Fix context path in cfg.xml


Approved-by: Yifei Zhang
This commit is contained in:
Eugene Ivantsov 2024-07-30 00:14:22 +00:00
parent 4739fca3c6
commit be37c311a8
2 changed files with 14 additions and 1 deletions

View File

@ -88,7 +88,8 @@
{% endif %}
{% if atl_tomcat_contextpath is defined and atl_tomcat_contextpath != '' %}
<property name="confluence.webapp.context.path">/{{ atl_tomcat_contextpath }}</property>
{% set context_path = atl_tomcat_contextpath if atl_tomcat_contextpath.startswith('/') else '/' + atl_tomcat_contextpath %}
<property name="confluence.webapp.context.path">{{ context_path }}</property>
{% endif %}
{% if atl_snapshot_used is defined %}

View File

@ -448,6 +448,18 @@ def test_confluence_xml_context_path(docker_cli, image, run_user):
assert xml.findall('.//property[@name="confluence.webapp.context.path"]')[0].text == "/myconf"
def test_confluence_xml_context_path_with_slash(docker_cli, image, run_user):
environment = {
'ATL_TOMCAT_CONTEXTPATH': '/myconf',
}
container = run_image(docker_cli, image, user=run_user, environment=environment)
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
xml = parse_xml(container, f'{get_app_home(container)}/confluence.cfg.xml')
assert xml.findall('.//property[@name="confluence.webapp.context.path"]')[0].text == "/myconf"
def test_confluence_xml_cluster_multicast(docker_cli, image, run_user):
environment = {
'ATL_CLUSTER_TYPE': 'multicast',