mirror of
https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server.git
synced 2024-08-30 18:22:16 +00:00
CLIP-1510: Handle 6.x and 8.x+ versions
This commit is contained in:
parent
245b53c476
commit
1f4f33360a
@ -11,10 +11,11 @@
|
||||
<property name="webwork.multipart.saveDir">${localHome}/temp</property>
|
||||
<property name="attachments.dir">${confluenceHome}/attachments</property>
|
||||
|
||||
{% if confluence_version.split(".")[1] | int() <= 13 %}
|
||||
{% set db_pool_variable = "c3p0" %}
|
||||
|
||||
{% if (confluence_version.split(".")[0] | int() == 7 and confluence_version.split(".")[1] | int() <= 13) or confluence_version.split(".")[0] | int() < 7 %}
|
||||
{% set db_pool_variable = "c3p0" %}
|
||||
{% else %}
|
||||
{% set db_pool_variable = "hikari" %}
|
||||
{% set db_pool_variable = "hikari" %}
|
||||
{% endif %}
|
||||
|
||||
<property name="lucene.index.dir">{{ atl_lucene_index_dir | default('${confluenceHome}/index') }}</property>
|
||||
|
@ -498,27 +498,15 @@ def test_confluence_xml_force_overwrite(docker_cli, image, run_user):
|
||||
assert xml.findall('.//property[@name="confluence.webapp.context.path"]')[0].text == "/myconf"
|
||||
|
||||
|
||||
def test_confluence_db_pool_version_7_13(docker_cli, image, run_user):
|
||||
@pytest.mark.parametrize("version,db_property", [('7.13.7', 'c3p0'), ('7.17.7', 'hikari'), ('6.9.0', 'c3p0'), ('8.0.0', 'hikari')])
|
||||
def test_confluence_db_pool_property(docker_cli, image, version, db_property):
|
||||
environment = {
|
||||
'CONFLUENCE_VERSION': '7.13.7',
|
||||
'CONFLUENCE_VERSION': version,
|
||||
'ATL_JDBC_URL': 'postgresql:hostname',
|
||||
'ATL_DB_TYPE': 'postgresql'
|
||||
}
|
||||
container = run_image(docker_cli, image, user=run_user, environment=environment)
|
||||
container = run_image(docker_cli, image, environment=environment)
|
||||
|
||||
xml = parse_xml(container, f'{get_app_home(container)}/confluence.cfg.xml')
|
||||
|
||||
assert xml.findall('.//property[@name="hibernate.c3p0.min_size"]')[0].text == "20"
|
||||
|
||||
|
||||
def test_confluence_db_pool_version_7_14(docker_cli, image, run_user):
|
||||
environment = {
|
||||
'CONFLUENCE_VERSION': '7.17.7',
|
||||
'ATL_JDBC_URL': 'postgresql:hostname',
|
||||
'ATL_DB_TYPE': 'postgresql'
|
||||
}
|
||||
container = run_image(docker_cli, image, user=run_user, environment=environment)
|
||||
|
||||
xml = parse_xml(container, f'{get_app_home(container)}/confluence.cfg.xml')
|
||||
|
||||
assert xml.findall('.//property[@name="hibernate.hikari.min_size"]')[0].text == "20"
|
||||
assert xml.findall(f'.//property[@name="hibernate.{db_property}.min_size"]')[0].text == "20"
|
||||
|
Loading…
Reference in New Issue
Block a user