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.
This commit is contained in:
parent
4241f5bb39
commit
a6a5daa209
1 changed files with 10 additions and 0 deletions
|
|
@ -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 <<EOF | tee "${EXTRA_COMPOSER_CONF}"
|
||||
# overrides the default rhel-* configuration
|
||||
[weldr_api.distros."rhel-*"]
|
||||
|
||||
# overrides the default rhel-8 alias
|
||||
[distro_aliases]
|
||||
rhel-8 = "rhel-8.8"
|
||||
rhel-9 = "rhel-9.4"
|
||||
EOF
|
||||
|
||||
# Provision the software under test.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue