From a6a5daa209305b868795213fc441484ffb8c5cad Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 27 May 2024 14:49:10 +0200 Subject: [PATCH] test/dot-notation-aliases: override rhel-8 alias The test relies on the existence of the /etc/dnf/vars/releasever file and the value it specifies. In SAP images, this file specifies the locked release version for the system and it is written by the image definition itself. This makes it a good candidate for ensuring we are using the correct distro version when building the image. However, RHEL 8.10 SAP images don't lock the distro version because 8.10 is the last minor version in the RHEL 8 cycle. Let's override the alias for RHEL 8 to point to 8.8, which is a version that should contain a releasever. The exact value we use isn't important. What we are testing here is the mechanism for resolving aliases. --- test/cases/weldr-distro-dot-notation-and-aliases.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/cases/weldr-distro-dot-notation-and-aliases.sh b/test/cases/weldr-distro-dot-notation-and-aliases.sh index 6097d62ef..7c999f938 100644 --- a/test/cases/weldr-distro-dot-notation-and-aliases.sh +++ b/test/cases/weldr-distro-dot-notation-and-aliases.sh @@ -33,10 +33,20 @@ trap cleanup EXIT # Remove any restrictions on the image types for weldr API, since # testing the distro alias requires building the SAP image. +# +# Also override the alias for RHEL 8 since the default alias, 8.10, doesn't +# have a locked version, so the releasever is not set in the dnf vars, and this +# test relies on that file to verify that we are using the correct distro +# object and code path. EXTRA_COMPOSER_CONF="$(mktemp -p "$TMPDIR")" cat <