Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update target os name due to RHELC-1737 #17208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion robottelo/utils/issue_handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Methods related to issue handlers in general
from robottelo.utils.issue_handlers import bugzilla, jira

handler_methods = {'BZ': bugzilla.is_open_bz, 'SAT': jira.is_open_jira}
handler_methods = {'BZ': bugzilla.is_open_bz, 'SAT': jira.is_open_jira, 'RHELC': jira.is_open_jira}
SUPPORTED_HANDLERS = tuple(f"{handler}" for handler in handler_methods)


Expand Down
7 changes: 5 additions & 2 deletions tests/foreman/api/test_convert2rhel.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from robottelo.config import settings
from robottelo.constants import DEFAULT_ARCHITECTURE, REPOS
from robottelo.utils.issue_handlers import is_open


def create_repo(sat, org, repo_url, ssl_cert=None):
Expand Down Expand Up @@ -254,7 +255,6 @@ def test_convert2rhel_oracle_with_pre_conversion_template_check(
:Verifies: SAT-24654, SAT-24655
"""
target_os_name = 'Red Hat'
major = version.split('.')[0]
assert oracle.execute('yum -y update').status == 0

Expand Down Expand Up @@ -328,6 +328,8 @@ def test_convert2rhel_oracle_with_pre_conversion_template_check(
assert host_content['facts']['conversions::success'] == 'true'
convert2rhel_facts = json.loads(oracle.execute('cat /etc/rhsm/facts/convert2rhel.facts').stdout)
assert convert2rhel_facts['conversions.env.CONVERT2RHEL_THROUGH_FOREMAN'] == '1'
# https://issues.redhat.com/browse/RHELC-1737
target_os_name = 'Oracle' if is_open('RHELC-1737') else 'Red Hat'
assert target_os_name in convert2rhel_facts['conversions.target_os.name']
assert convert2rhel_facts['conversions.success'] is True

Expand All @@ -353,7 +355,6 @@ def test_convert2rhel_centos_with_pre_conversion_template_check(
:Verifies: SAT-24654, SAT-24655
"""
target_os_name = 'Red Hat'
host_content = module_target_sat.api.Host(id=centos.hostname).read_json()
major = version.split('.')[0]
assert host_content['operatingsystem_name'] == f'CentOS {major}'
Expand Down Expand Up @@ -422,5 +423,7 @@ def test_convert2rhel_centos_with_pre_conversion_template_check(
assert host_content['facts']['conversions::success'] == 'true'
convert2rhel_facts = json.loads(centos.execute('cat /etc/rhsm/facts/convert2rhel.facts').stdout)
assert convert2rhel_facts['conversions.env.CONVERT2RHEL_THROUGH_FOREMAN'] == '1'
# https://issues.redhat.com/browse/RHELC-1737
target_os_name = 'CentOS Linux' if is_open('RHELC-1737') else 'Red Hat'
assert target_os_name in convert2rhel_facts['conversions.target_os.name']
assert convert2rhel_facts['conversions.success'] is True
Loading