From da1062e11a91aee8d23f27dca17f7f55d90996cb Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Fri, 8 Jul 2022 12:35:46 +1000 Subject: [PATCH] working on molecule tests for the alternate obr stuff --- .gitignore | 1 + .../jira_tarball_download_url/converge.yml | 18 +----------------- .../jira_tarball_download_url/molecule.yml | 2 ++ .../tests/test_default.py | 4 ++-- .../tasks/jira-servicedesk_as_obr.yml | 4 ++++ 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 321ff61..453a538 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ __pycache__ *.pyc /.venv \#*\# +.envrc .idea .vscode diff --git a/roles/product_install/molecule/jira_tarball_download_url/converge.yml b/roles/product_install/molecule/jira_tarball_download_url/converge.yml index 5f8e8a1..6b455ae 100644 --- a/roles/product_install/molecule/jira_tarball_download_url/converge.yml +++ b/roles/product_install/molecule/jira_tarball_download_url/converge.yml @@ -14,28 +14,12 @@ # Although marketplace (mpac) is used in this example, this could potentially be in a non mpac url. # In this case it would not be possible to query atl_jsd_build_info to source the atl_jsd_build. One is therefore provided. atl_install_jsd_as_obr: true - atl_source_obr_from_marketplace: false - atl_jsd_build: "4.14.0" + atl_jsd_build: "4.18.0" atl_obr_download_url: "https://marketplace.atlassian.com/download/apps/1213632/version/1040180000" # When using a tarball the following are also required: atl_download_format: "tarball" atl_use_system_jdk: true - atl_systemd_service_name: "jira.service" - atl_jdbc_encoding: 'UNICODE' - atl_jdbc_collation: 'C' - atl_jdbc_ctype: 'C' - atl_jdbc_template: 'template0' - pre_tasks: - - name: Create cache dir - file: - path: '/media/atl/jira/shared/' - state: directory - - name: Seed version - copy: - dest: '/media/atl/jira/shared/jira-software.version' - content: "8.14.0" - force: false # For idempotency check roles: - role: linux_common - role: product_common diff --git a/roles/product_install/molecule/jira_tarball_download_url/molecule.yml b/roles/product_install/molecule/jira_tarball_download_url/molecule.yml index 3ea826a..644207c 100644 --- a/roles/product_install/molecule/jira_tarball_download_url/molecule.yml +++ b/roles/product_install/molecule/jira_tarball_download_url/molecule.yml @@ -21,3 +21,5 @@ provisioner: group_vars: ../../../../group_vars/ verifier: name: testinfra + additional_files_or_dirs: + - ../../resources/tests/test_*.py diff --git a/roles/product_install/molecule/jira_tarball_download_url/tests/test_default.py b/roles/product_install/molecule/jira_tarball_download_url/tests/test_default.py index 599a6f8..ed228e3 100644 --- a/roles/product_install/molecule/jira_tarball_download_url/tests/test_default.py +++ b/roles/product_install/molecule/jira_tarball_download_url/tests/test_default.py @@ -32,12 +32,12 @@ def test_is_unpacked(host): assert installer.mode == 0o0755 def test_obr_is_downloaded(host): - installer = host.file('/media/atl/downloads/jira-servicedesk-application-4.14.0.obr') + installer = host.file('/media/atl/downloads/jira-servicedesk-application-4.18.0.obr') assert installer.exists assert installer.user == 'root' def test_obr_completed_lockfile(host): - lockfile = host.file('/media/atl/downloads/jira-servicedesk-application-4.14.0.obr_completed') + lockfile = host.file('/media/atl/downloads/jira-servicedesk-application-4.18.0.obr_completed') assert lockfile.exists assert lockfile.user == 'root' diff --git a/roles/product_install/tasks/jira-servicedesk_as_obr.yml b/roles/product_install/tasks/jira-servicedesk_as_obr.yml index aa6a0f5..09bfe77 100644 --- a/roles/product_install/tasks/jira-servicedesk_as_obr.yml +++ b/roles/product_install/tasks/jira-servicedesk_as_obr.yml @@ -109,6 +109,10 @@ # Fetch obr if required - name: download_obr is true so fetch and do all the things block: + - debug: + var: atl_obr_download_url + - debug: + var: atl_obr_download # Fetch obr and copy to temp - name: Fetch obr