diff --git a/config/confluence.cfg.xml.j2 b/config/confluence.cfg.xml.j2 index f293613..5519f7b 100644 --- a/config/confluence.cfg.xml.j2 +++ b/config/confluence.cfg.xml.j2 @@ -26,6 +26,9 @@ {{ atl_jdbc_url }} {{ atl_jdbc_user }} + {% if atl_jdbc_secret_class is defined %} + {{ atl_jdbc_secret_class }} + {% endif %} {{ atl_jdbc_password }} {{ databases[atl_db_type][0] }} com.atlassian.confluence.impl.hibernate.dialect.{{ databases[atl_db_type][1] }} diff --git a/tests/test_image.py b/tests/test_image.py index 104e74a..22b41be 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -314,6 +314,7 @@ def test_confluence_xml_postgres_c3p0(docker_cli, image, run_user): 'ATL_JDBC_URL': 'atl_jdbc_url', 'ATL_JDBC_USER': 'atl_jdbc_user', 'ATL_JDBC_PASSWORD': 'atl_jdbc_password', + 'ATL_JDBC_SECRET_CLASS': 'atl_jdbc_secret_class', } container = run_image(docker_cli, image, user=run_user, environment=environment) _jvm = wait_for_proc(container, get_bootstrap_proc(container)) @@ -322,6 +323,7 @@ def test_confluence_xml_postgres_c3p0(docker_cli, image, run_user): assert xml.findall('.//property[@name="hibernate.connection.url"]')[0].text == "atl_jdbc_url" assert xml.findall('.//property[@name="hibernate.connection.username"]')[0].text == "atl_jdbc_user" assert xml.findall('.//property[@name="hibernate.connection.password"]')[0].text == "atl_jdbc_password" + assert xml.findall('.//property[@name="jdbc.password.decrypter.classname"]')[0].text == "atl_jdbc_secret_class" assert xml.findall('.//property[@name="confluence.database.choice"]')[0].text == "postgresql" assert xml.findall('.//property[@name="hibernate.dialect"]')[0].text == "com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect" assert xml.findall('.//property[@name="hibernate.connection.driver_class"]')[0].text == "org.postgresql.Driver"