DCD-224: Refactor installer role to work around various quirks.

This commit is contained in:
Steve Smith
2019-05-08 12:13:29 +10:00
parent a5eefe326e
commit 1aa2afc6f2
19 changed files with 86 additions and 68 deletions

View File

@@ -19,7 +19,7 @@ def test_is_downloaded(host):
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/opt/atlassian/jira-core/7.9.0')
installer = host.file('/opt/atlassian/jira-core/7.9.0/atlassian-jira/')
assert installer.exists
assert installer.is_directory
assert installer.user == 'jira'

View File

@@ -23,4 +23,3 @@ def test_is_unpacked(host):
assert installer.exists
assert installer.is_directory
assert installer.user == 'jira'
assert installer.mode == 0o0755

View File

@@ -11,27 +11,20 @@ def test_version_is_correct(host):
verfile = host.file('/media/atl/jira/shared/jira-servicedesk.version')
assert verfile.exists
assert verfile.content.decode("UTF-8").strip() == "3.0.2"
assert verfile.content.decode("UTF-8").strip() == "3.9.0"
def test_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-software.7.0.11.tar.gz')
installer = host.file('/opt/atlassian/tmp/servicedesk.3.9.0.bin')
assert installer.exists
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/opt/atlassian/jira-servicedesk/3.0.2')
installer = host.file('/opt/atlassian/jira-servicedesk/3.9.0')
assert installer.exists
assert installer.is_directory
assert installer.user == 'jira'
assert installer.mode == 0o0755
def test_sd_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-servicedesk.3.0.2.obr')
assert installer.exists
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/media/atl/jira/shared/plugins/installed-plugins/jira-servicedesk-application-3.0.2.jar')
def test_plugin_is_present(host):
installer = host.file('/opt/atlassian/jira-servicedesk/current/atlassian-jira/WEB-INF/application-installation/jira-servicedesk-application/jira-servicedesk-application-3.9.0.jar')
assert installer.exists
assert installer.user == 'jira'
assert installer.mode == 0o0750

View File

@@ -14,7 +14,7 @@ def test_version_is_correct(host):
assert verfile.content.decode("UTF-8").strip() == "4.1.0"
def test_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-software.8.1.0.tar.gz')
installer = host.file('/opt/atlassian/tmp/servicedesk.4.1.0.bin')
assert installer.exists
assert installer.user == 'root'
@@ -23,15 +23,8 @@ def test_is_unpacked(host):
assert installer.exists
assert installer.is_directory
assert installer.user == 'jira'
assert installer.mode == 0o0755
def test_sd_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-servicedesk.4.1.0.obr')
assert installer.exists
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/media/atl/jira/shared/plugins/installed-plugins/jira-servicedesk-application-4.1.0.jar')
def test_plugin_is_present(host):
installer = host.file('/opt/atlassian/jira-servicedesk/current/atlassian-jira/WEB-INF/application-installation/jira-servicedesk-application/jira-servicedesk-application-4.1.0.jar')
assert installer.exists
assert installer.user == 'jira'
assert installer.mode == 0o0750

View File

@@ -23,24 +23,17 @@ def test_version_is_correct(host):
assert verfile.content.decode("UTF-8").strip() == sd
def test_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-software.'+jira+'.tar.gz')
installer = host.file('/opt/atlassian/tmp/servicedesk.'+sd+'.bin')
assert installer.exists
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/opt/atlassian/jira-servicedesk/'+jira)
installer = host.file('/opt/atlassian/jira-servicedesk/'+sd)
assert installer.exists
assert installer.is_directory
assert installer.user == 'jira'
assert installer.mode == 0o0755
def test_sd_is_downloaded(host):
installer = host.file('/opt/atlassian/tmp/jira-servicedesk.'+sd+'.obr')
assert installer.exists
assert installer.user == 'root'
def test_is_unpacked(host):
installer = host.file('/media/atl/jira/shared/plugins/installed-plugins/jira-servicedesk-application-'+sd+'.jar')
def test_plugin_is_present(host):
installer = host.file('/opt/atlassian/jira-servicedesk/current/atlassian-jira/WEB-INF/application-installation/jira-servicedesk-application/jira-servicedesk-application-'+sd+'.jar')
assert installer.exists
assert installer.user == 'jira'
assert installer.mode == 0o0750