mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Move to testing downloads against jira-core.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
atl_product_family: "jira"
|
atl_product_family: "jira"
|
||||||
atl_product_edition: "jira-software"
|
atl_product_edition: "jira-core"
|
||||||
atl_product_user: "jira"
|
atl_product_user: "jira"
|
||||||
roles:
|
roles:
|
||||||
- role: linux_common
|
- role: linux_common
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_version_file_is_latest(host):
|
def test_version_file_is_latest(host):
|
||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
||||||
upstream = upstream_fd.read()
|
upstream = upstream_fd.read()
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
||||||
|
|
||||||
def test_latest_is_downloaded(host):
|
def test_latest_is_downloaded(host):
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
||||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
upstream = upstream_fd.read().decode("UTF-8").strip()
|
||||||
|
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.tar.gz')
|
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.tar.gz')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.user == 'root'
|
assert installer.user == 'root'
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_version_downloaded(host):
|
def test_version_downloaded(host):
|
||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
def test_symlink_created(host):
|
def test_symlink_created(host):
|
||||||
target = host.file('/opt/atlassian/jira-software/current')
|
target = host.file('/opt/atlassian/jira-core/current')
|
||||||
assert target.exists
|
assert target.exists
|
||||||
assert target.is_symlink
|
assert target.is_symlink
|
||||||
|
|
||||||
def test_unpacked(host):
|
def test_unpacked(host):
|
||||||
verfile = host.file('/opt/atlassian/jira-software/current/bin/catalina.sh')
|
verfile = host.file('/opt/atlassian/jira-core/current/bin/catalina.sh')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
atl_product_family: "jira"
|
atl_product_family: "jira"
|
||||||
atl_product_edition: "jira-software"
|
atl_product_edition: "jira-core"
|
||||||
atl_product_user: "jira"
|
atl_product_user: "jira"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
- name: Seed version
|
- name: Seed version
|
||||||
copy:
|
copy:
|
||||||
dest: '/media/atl/jira/shared/jira-software.version'
|
dest: '/media/atl/jira/shared/jira-core.version'
|
||||||
content: "7.9.0"
|
content: "7.9.0"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_version_is_correct(host):
|
def test_version_is_correct(host):
|
||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == "7.9.0"
|
assert verfile.content.decode("UTF-8").strip() == "7.9.0"
|
||||||
|
|
||||||
def test_is_downloaded(host):
|
def test_is_downloaded(host):
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-software.7.9.0.tar.gz')
|
installer = host.file('/opt/atlassian/tmp/jira-core.7.9.0.tar.gz')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.user == 'root'
|
assert installer.user == 'root'
|
||||||
|
|
||||||
def test_is_unpacked(host):
|
def test_is_unpacked(host):
|
||||||
installer = host.file('/opt/atlassian/jira-software/7.9.0')
|
installer = host.file('/opt/atlassian/jira-core/7.9.0')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.is_directory
|
assert installer.is_directory
|
||||||
assert installer.user == 'jira'
|
assert installer.user == 'jira'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
atl_product_family: "jira"
|
atl_product_family: "jira"
|
||||||
atl_product_edition: "jira-software"
|
atl_product_edition: "jira-core"
|
||||||
atl_product_user: "jira"
|
atl_product_user: "jira"
|
||||||
atl_product_version: "latest"
|
atl_product_version: "latest"
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_version_file_is_latest(host):
|
def test_version_file_is_latest(host):
|
||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
||||||
upstream = upstream_fd.read()
|
upstream = upstream_fd.read()
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
||||||
|
|
||||||
def test_latest_is_downloaded(host):
|
def test_latest_is_downloaded(host):
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
||||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
upstream = upstream_fd.read().decode("UTF-8").strip()
|
||||||
|
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.tar.gz')
|
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.tar.gz')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.user == 'root'
|
assert installer.user == 'root'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
atl_product_family: "jira"
|
atl_product_family: "jira"
|
||||||
atl_product_edition: "jira-software"
|
atl_product_edition: "jira-core"
|
||||||
atl_product_user: "jira"
|
atl_product_user: "jira"
|
||||||
atl_product_version: "7.13.2"
|
atl_product_version: "7.13.2"
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_version_is_correct(host):
|
def test_version_is_correct(host):
|
||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == "7.13.2"
|
assert verfile.content.decode("UTF-8").strip() == "7.13.2"
|
||||||
|
|
||||||
def test_is_downloaded(host):
|
def test_is_downloaded(host):
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-software.7.13.2.tar.gz')
|
installer = host.file('/opt/atlassian/tmp/jira-core.7.13.2.tar.gz')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.user == 'root'
|
assert installer.user == 'root'
|
||||||
|
|
||||||
def test_is_unpacked(host):
|
def test_is_unpacked(host):
|
||||||
installer = host.file('/opt/atlassian/jira-software/7.13.2')
|
installer = host.file('/opt/atlassian/jira-core/7.13.2')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
assert installer.is_directory
|
assert installer.is_directory
|
||||||
assert installer.user == 'jira'
|
assert installer.user == 'jira'
|
||||||
|
|||||||
Reference in New Issue
Block a user