mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Rename product_download to tgz_download in prep for an alternative installer.
This commit is contained in:
25
roles/tgz_download/molecule/default/tests/test_default.py
Normal file
25
roles/tgz_download/molecule/default/tests/test_default.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
import urllib.request
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_version_file_is_latest(host):
|
||||
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||
assert verfile.exists
|
||||
|
||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
||||
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-core/latest")
|
||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
||||
|
||||
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.tar.gz')
|
||||
assert installer.exists
|
||||
assert installer.user == 'root'
|
||||
Reference in New Issue
Block a user