Skip to content

Commit

Permalink
Update outdated packages on centos and oracle hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta83 committed Jan 11, 2024
1 parent 73e1475 commit 08cedb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/foreman/api/test_convert2rhel.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def centos(
"""Deploy and register Centos host"""
# updating centos packages on CentOS 8 is necessary for conversion
major = version.split('.')[0]
centos_host.execute('yum -y update')
if major == '8':
centos_host.execute('yum -y update centos-*')
repo_url = settings.repos.convert2rhel.convert_to_rhel_repo.format(major)
Expand Down Expand Up @@ -199,6 +200,7 @@ def oracle(
# disable rhn-client-tools because it obsoletes the subscription manager package
oracle_host.execute('echo "exclude=rhn-client-tools" >> /etc/yum.conf')
# install and set correct kernel, based on convert2rhel docs
oracle_host.execute('yum -y update kernel*')
result = oracle_host.execute(
'yum install -y kernel && '
'grubby --set-default /boot/vmlinuz-'
Expand Down Expand Up @@ -263,6 +265,7 @@ def test_convert2rhel_oracle(module_target_sat, oracle, activation_key_rhel, ver
:CaseImportance: Medium
"""
oracle.execute('yum -y update')
host_content = module_target_sat.api.Host(id=oracle.hostname).read_json()
assert host_content['operatingsystem_name'] == f"OracleLinux {version}"

Expand Down

0 comments on commit 08cedb3

Please sign in to comment.