From f237af9bda56225fa155cfd078de7db5350a9b2d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 14 Feb 2025 12:05:40 +0100 Subject: [PATCH] cloudapi: move fedora-39 test forward to fedora-42 This commit fixes the failing TestGetImageRequests_BlueprintDistro test. It fails because fedora-39 is no longer part of the supported distros and can no longer be build. Move to fedora-42 so that we have a bit time before we need to update it again. It also updates TestGetImageRequests_NoRepositories to point to fedora-42. --- internal/cloudapi/v2/compose_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/cloudapi/v2/compose_test.go b/internal/cloudapi/v2/compose_test.go index 17623c173..7590366f0 100644 --- a/internal/cloudapi/v2/compose_test.go +++ b/internal/cloudapi/v2/compose_test.go @@ -805,7 +805,7 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) { func TestGetImageRequests_NoRepositories(t *testing.T) { uo := UploadOptions(struct{}{}) request := &ComposeRequest{ - Distribution: "fedora-40", + Distribution: "fedora-42", ImageRequest: &ImageRequest{ Architecture: "x86_64", ImageType: ImageTypesAws, @@ -819,14 +819,14 @@ func TestGetImageRequests_NoRepositories(t *testing.T) { assert.NoError(t, err) require.Len(t, got, 1) require.Greater(t, len(got[0].repositories), 0) - assert.Contains(t, got[0].repositories[0].Metalink, "40") + assert.Contains(t, got[0].repositories[0].Metalink, "42") } // TestGetImageRequests_BlueprintDistro test to make sure blueprint distro overrides request distro func TestGetImageRequests_BlueprintDistro(t *testing.T) { uo := UploadOptions(struct{}{}) request := &ComposeRequest{ - Distribution: "fedora-40", + Distribution: "fedora-42", ImageRequest: &ImageRequest{ Architecture: "x86_64", ImageType: ImageTypesAws, @@ -835,7 +835,7 @@ func TestGetImageRequests_BlueprintDistro(t *testing.T) { }, Blueprint: &Blueprint{ Name: "distro-test", - Distro: common.ToPtr("fedora-39"), + Distro: common.ToPtr("fedora-42"), }, } rr, err := reporegistry.New(nil, []fs.FS{repos.FS}) @@ -844,8 +844,8 @@ func TestGetImageRequests_BlueprintDistro(t *testing.T) { assert.NoError(t, err) require.Len(t, got, 1) require.Greater(t, len(got[0].repositories), 0) - assert.Contains(t, got[0].repositories[0].Metalink, "39") - assert.Equal(t, got[0].blueprint.Distro, "fedora-39") + assert.Contains(t, got[0].repositories[0].Metalink, "42") + assert.Equal(t, got[0].blueprint.Distro, "fedora-42") } func TestOpenSCAPTailoringOptions(t *testing.T) {