From 1d37647506d304acb5c65dab1a8cbcdf31548450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Thu, 18 May 2023 14:55:03 +0200 Subject: [PATCH] distro/fedora: remove empty `s390x` architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fedora distro definition contained an empty `s390x` architecture with no image types added to it. Let's remove it from the distro definition, since it's adding no value in its current form. Signed-off-by: Tomáš Hozza --- internal/distro/fedora/distro.go | 9 +-------- internal/distro/fedora/distro_test.go | 9 +++++++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/internal/distro/fedora/distro.go b/internal/distro/fedora/distro.go index 535c0b04b..dbec8508d 100644 --- a/internal/distro/fedora/distro.go +++ b/internal/distro/fedora/distro.go @@ -893,11 +893,6 @@ func newDistro(version int) distro.Distro { distro: &rd, } - s390x := architecture{ - distro: &rd, - name: distro.S390xArchName, - } - ociImgType := qcow2ImgType ociImgType.name = "oci" @@ -1101,8 +1096,6 @@ func newDistro(version int) distro.Distro { minimalrawImgType, ) - s390x.addImageTypes(nil) - - rd.addArches(x86_64, aarch64, s390x) + rd.addArches(x86_64, aarch64) return &rd } diff --git a/internal/distro/fedora/distro_test.go b/internal/distro/fedora/distro_test.go index 5f2f4757c..a05fcf02e 100644 --- a/internal/distro/fedora/distro_test.go +++ b/internal/distro/fedora/distro_test.go @@ -494,7 +494,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) { func TestFedora_ListArches(t *testing.T) { arches := fedora.NewF37().ListArches() - assert.Equal(t, []string{"aarch64", "s390x", "x86_64"}, arches) + assert.Equal(t, []string{"aarch64", "x86_64"}, arches) } func TestFedora37_GetArch(t *testing.T) { @@ -510,7 +510,12 @@ func TestFedora37_GetArch(t *testing.T) { name: "aarch64", }, { - name: "s390x", + name: "s390x", + errorExpected: true, + }, + { + name: "ppc64le", + errorExpected: true, }, { name: "foo-arch",