From 605a4ea80fb2f43bef16ebd7b7534f436ce3a819 Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Thu, 26 Aug 2021 15:20:14 +0200 Subject: [PATCH] tests: workaround for terraform installation on RHEL-9 There is currently no hashicorp repository for RHEL-9 so fallback to using RHEL-8 version instead. --- test/cases/azure.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/cases/azure.sh b/test/cases/azure.sh index bacac97a7..80cf60e4c 100755 --- a/test/cases/azure.sh +++ b/test/cases/azure.sh @@ -44,6 +44,11 @@ else exit 1 fi sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo +# set $releasever to 8 when running on RHEL-9 because there is no hashicorp repo for it yet +if [[ $ID == rhel || $ID == centos ]] && [[ ${VERSION_ID%.*} == 9 ]]; then + # shellcheck disable=SC2016 + sudo sed -i 's/$releasever/8/g' /etc/yum.repos.d/hashicorp.repo +fi sudo dnf install -y terraform ARCH=$(uname -m)