From 46df9a5a99039c3033a70bc30a7b138821f594e4 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 6 Nov 2019 15:12:13 +0200 Subject: [PATCH] tests: Keep beakerlib repo on the VM for tests which need it Related: rhbz#1769525 --- test/vm.install | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/vm.install b/test/vm.install index b75a9525..92b6fb19 100755 --- a/test/vm.install +++ b/test/vm.install @@ -5,16 +5,13 @@ SRPM="$1" if ! rpm -q beakerlib; then if [ $(. /etc/os-release && echo $ID) = "rhel" ]; then (cd /etc/yum.repos.d; curl -O -L http://download.devel.redhat.com/beakerrepos/beaker-client-RedHatEnterpriseLinux.repo) - - # The beaker repository doesn't include repos for minor releases - VERSION=$(. /etc/os-release && echo ${VERSION_ID%.*}) - yum install -y --releasever=$VERSION --setopt=sslverify=0 beakerlib - - # prevent yum from trying to sync the cache again later (it fails without sslverify=0) - rm /etc/yum.repos.d/beaker-client-RedHatEnterpriseLinux.repo - else - yum install -y beakerlib + # disable sslverify b/c yum will fail to sync metadata otherwise + sed -i "s/\(gpgcheck=0\)/\1\nsslverify=0/" /etc/yum.repos.d/beaker-client-RedHatEnterpriseLinux.repo + # do not remove the repo file. We now have tests which use beakerlib + # inside their blueprints so this needs to stay on the VM fi + + yum install -y beakerlib fi if ! rpm -q git; then