mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-1020: Add test for font installation with system JDK.
This commit is contained in:
14
roles/confluence_config/molecule/system_jdk/Dockerfile.j2
Normal file
14
roles/confluence_config/molecule/system_jdk/Dockerfile.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
# Molecule managed
|
||||
|
||||
{% if item.registry is defined %}
|
||||
FROM {{ item.registry.url }}/{{ item.image }}
|
||||
{% else %}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
|
||||
32
roles/confluence_config/molecule/system_jdk/molecule.yml
Normal file
32
roles/confluence_config/molecule/system_jdk/molecule.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
groups:
|
||||
- aws_node_local
|
||||
- name: ubuntu_lts
|
||||
image: ubuntu:bionic
|
||||
groups:
|
||||
- aws_node_local
|
||||
provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["701"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
30
roles/confluence_config/molecule/system_jdk/playbook.yml
Normal file
30
roles/confluence_config/molecule/system_jdk/playbook.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
atl_product_family: "confluence"
|
||||
atl_product_edition: "confluence"
|
||||
atl_product_user: "confluence"
|
||||
atl_product_version: "latest"
|
||||
atl_db_engine: "postgres"
|
||||
atl_db_host: "postgres-db.ap-southeast-2.rds.amazonaws.com"
|
||||
atl_jdbc_db_name: "confluence"
|
||||
atl_jdbc_user: 'confluence'
|
||||
atl_jdbc_password: 'molecule_password'
|
||||
atl_jvm_heap: 'PLACEHOLDER'
|
||||
atl_cluster_node_id: 'FAKEID'
|
||||
atl_autologin_cookie_age: "COOKIEAGE"
|
||||
atl_local_ipv4: "1.1.1.1"
|
||||
atl_tomcat_scheme: "http"
|
||||
atl_proxy_name: "localhost"
|
||||
atl_proxy_port: "80"
|
||||
atl_db_preferredtestquery: "select 1;"
|
||||
atl_use_system_jdk: true
|
||||
atl_download_format: "tarball"
|
||||
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: product_common
|
||||
- role: product_install
|
||||
- role: confluence_common
|
||||
- role: confluence_config
|
||||
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
import pytest
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
def test_seraph_file(host):
|
||||
f = host.file('/opt/atlassian/confluence/current/confluence/WEB-INF/classes/seraph-config.xml')
|
||||
assert f.exists
|
||||
assert f.contains('<param-value>COOKIEAGE</param-value>')
|
||||
|
||||
@pytest.mark.parametrize('font', [
|
||||
'/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf',
|
||||
'/usr/lib/jvm/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf'
|
||||
])
|
||||
def test_fonts_installed_and_linked(host, font):
|
||||
f = host.file(font)
|
||||
assert f.exists
|
||||
Reference in New Issue
Block a user