DCD-621: fixes installer tests - Test should assert for full file name for installer. Previously, tests were missing checking for -x64 installer suffix

This commit is contained in:
Varun Arbatti
2019-08-29 12:50:52 +10:00
parent 7114795020
commit 2d83585803
5 changed files with 9 additions and 7 deletions

View File

@@ -24,17 +24,19 @@ def test_version_file_is_latest(host):
verfile = host.file('/media/atl/bitbucket/shared/bitbucket.version')
assert verfile.exists
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest")
upstream_fd = urllib.request.urlopen(
"https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
assert verfile.content.decode("UTF-8").strip() == upstream.strip()
def test_latest_is_downloaded(host):
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest")
upstream_fd = urllib.request.urlopen(
"https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/bitbucket.'+upstream+'.bin')
installer = host.file('/opt/atlassian/tmp/bitbucket.' + upstream + '-x64.bin')
assert installer.exists
assert installer.user == 'root'

View File

@@ -35,6 +35,6 @@ def test_latest_is_downloaded(host):
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/confluence.'+upstream+'.bin')
installer = host.file('/opt/atlassian/tmp/confluence.'+upstream+'-x64.bin')
assert installer.exists
assert installer.user == 'root'

View File

@@ -23,6 +23,6 @@ def test_latest_is_downloaded(host):
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'-x64.bin')
assert installer.exists
assert installer.user == 'root'

View File

@@ -35,6 +35,6 @@ def test_latest_is_downloaded(host):
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.bin')
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'-x64.bin')
assert installer.exists
assert installer.user == 'root'

View File

@@ -23,6 +23,6 @@ def test_latest_is_downloaded(host):
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'-x64.bin')
assert installer.exists
assert installer.user == 'root'