diff --git a/tests/foreman/api/test_convert2rhel.py b/tests/foreman/api/test_convert2rhel.py index 026acb467b..24684eb9eb 100644 --- a/tests/foreman/api/test_convert2rhel.py +++ b/tests/foreman/api/test_convert2rhel.py @@ -161,6 +161,14 @@ def centos( # updating centos packages on CentOS 8 is necessary for conversion major = version.split('.')[0] if major == '8': + # Workaround: contents for CentOS 8 are archived and moved to vault mirror after it is EOL + centos_host.execute( + 'sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*' + ) + centos_host.execute( + 'sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*' + ) + centos_host.execute('yum -y update centos-*') repo_url = settings.repos.convert2rhel.convert_to_rhel_repo.format(major) repo = create_repo(module_target_sat, module_entitlement_manifest_org, repo_url)