From 695febf39cf9fe697d74b49559be3a1b5d4207d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Fri, 31 May 2024 14:29:15 +0200 Subject: [PATCH] Define distro alias for 'rhel-10' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set it to RHEL-10.0. Signed-off-by: Tomáš Hozza --- cmd/osbuild-composer/config.go | 7 ++++--- cmd/osbuild-composer/config_test.go | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/osbuild-composer/config.go b/cmd/osbuild-composer/config.go index ad55398d2..63f2094f3 100644 --- a/cmd/osbuild-composer/config.go +++ b/cmd/osbuild-composer/config.go @@ -123,9 +123,10 @@ func GetDefaultConfig() *ComposerConfigFile { }, }, DistroAliases: map[string]string{ - "rhel-7": "rhel-7.9", - "rhel-8": "rhel-8.10", - "rhel-9": "rhel-9.4", + "rhel-7": "rhel-7.9", + "rhel-8": "rhel-8.10", + "rhel-9": "rhel-9.4", + "rhel-10": "rhel-10.0", }, LogLevel: "info", LogFormat: "text", diff --git a/cmd/osbuild-composer/config_test.go b/cmd/osbuild-composer/config_test.go index c5b1d2d7a..8555d0611 100644 --- a/cmd/osbuild-composer/config_test.go +++ b/cmd/osbuild-composer/config_test.go @@ -70,9 +70,10 @@ func TestDefaultConfig(t *testing.T) { require.Equal(t, expectedWeldrAPIConfig, defaultConfig.WeldrAPI) expectedDistroAliases := map[string]string{ - "rhel-7": "rhel-7.9", - "rhel-8": "rhel-8.10", - "rhel-9": "rhel-9.4", + "rhel-10": "rhel-10.0", + "rhel-7": "rhel-7.9", + "rhel-8": "rhel-8.10", + "rhel-9": "rhel-9.4", } require.Equal(t, expectedDistroAliases, defaultConfig.DistroAliases) @@ -108,9 +109,10 @@ func TestConfig(t *testing.T) { // 'rhel-8' and 'rhel-9' aliases are overwritten by the config file expectedDistroAliases := map[string]string{ - "rhel-7": "rhel-7.9", // this value is from the default config - "rhel-8": "rhel-8.9", - "rhel-9": "rhel-9.3", + "rhel-10": "rhel-10.0", // this value is from the default config + "rhel-7": "rhel-7.9", // this value is from the default config + "rhel-8": "rhel-8.9", + "rhel-9": "rhel-9.3", } require.Equal(t, expectedDistroAliases, config.DistroAliases) }