DCD-224: Add fetching of the installer.

This commit is contained in:
Steve Smith
2019-04-15 13:06:41 +10:00
parent 6e596bef55
commit 94c06ce4d5
3 changed files with 25 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ def test_version_downloaded(host):
assert verfile.exists
def test_version_is_latest(host):
def test_version_file_is_latest(host):
verfile = host.file('/media/atl/jira/shared/jira-software.version')
assert verfile.exists
@@ -20,3 +20,12 @@ def test_version_is_latest(host):
upstream = upstream_fd.read()
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
def test_latest_is_downloaded(host):
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
upstream = upstream_fd.read().decode("UTF-8").strip()
installer = host.file('/media/atl/jira/shared/jira-software.'+upstream+'.bin')
assert installer.exists
assert installer.user == 'root'
assert installer.mode == 0o0755