Merge remote-tracking branch 'origin/master' into ITOPS-1677-add-crowd-support-in-dc-deployment

This commit is contained in:
Azra Sulthana
2019-07-11 05:41:57 +00:00
18 changed files with 140 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ import os
from six.moves import urllib
import testinfra.utils.ansible_runner
import json
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@@ -11,14 +12,16 @@ 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()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
assert verfile.content.decode("UTF-8").strip() == upstream.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()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
assert installer.exists

View File

@@ -2,6 +2,7 @@ import os
from six.moves import urllib
import testinfra.utils.ansible_runner
import json
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@@ -23,14 +24,16 @@ def test_version_file_is_latest(host):
verfile = host.file('/media/atl/jira/shared/jira-software.version')
assert verfile.exists
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
upstream = upstream_fd.read()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
assert verfile.content.decode("UTF-8").strip() == upstream.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()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.bin')
assert installer.exists

View File

@@ -2,6 +2,7 @@ import os
from six.moves import urllib
import testinfra.utils.ansible_runner
import json
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@@ -11,14 +12,16 @@ 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()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
assert verfile.content.decode("UTF-8").strip() == upstream.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()
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
upstream_json = json.load(upstream_fd)
upstream = upstream_json['version']
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
assert installer.exists