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.
This commit is contained in:
Michael Vogt 2025-02-14 12:05:40 +01:00 committed by Achilleas Koutsou
parent 409b4f6048
commit f237af9bda

View file

@ -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) {