fedora: add the iot-raw-image to x86 and aarch64
Add the new image type to the list in each architecture and update tests. Ignore ostree raw images in Kernel count test in distro_test_common: Edge and IoT raw images don't need a kernel specified in their OS pipeline. The kernel (and the OS in general, including all packages) come from the commit that is pulled and deployed in the image. This test passes on RHEL (for edge-raw-image types) because the blueprint defaults to returning the main kernel, but this isn't necessary and is likely to change in the near future. Co-Authored-By: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
74a196e427
commit
c6843db6b4
3 changed files with 13 additions and 7 deletions
|
|
@ -226,8 +226,8 @@ func TestDistro_KernelOption(t *testing.T, d distro.Distro) {
|
|||
imgType, err := arch.GetImageType(typeName)
|
||||
assert.NoError(t, err)
|
||||
nk := kernelCount(imgType)
|
||||
// No kernel packages in containers
|
||||
if strings.HasSuffix(typeName, "container") {
|
||||
// No kernel packages in containers and edge/iot images
|
||||
if strings.HasSuffix(typeName, "container") || strings.HasSuffix(typeName, "edge-raw-image") || strings.HasSuffix(typeName, "iot-raw-image") {
|
||||
continue
|
||||
}
|
||||
// at least one kernel for general image types
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ var (
|
|||
exports: []string{"bootiso"},
|
||||
}
|
||||
|
||||
_ = imageType{
|
||||
iotRawImgType = imageType{
|
||||
name: "fedora-iot-raw-image",
|
||||
nameAliases: []string{"iot-raw-image"},
|
||||
filename: "image.raw.xz",
|
||||
|
|
@ -854,6 +854,7 @@ func newDistro(version int) distro.Distro {
|
|||
iotOCIImgType,
|
||||
iotCommitImgType,
|
||||
iotInstallerImgType,
|
||||
iotRawImgType,
|
||||
)
|
||||
aarch64.addImageTypes(
|
||||
&platform.Aarch64{
|
||||
|
|
@ -902,6 +903,7 @@ func newDistro(version int) distro.Distro {
|
|||
iotCommitImgType,
|
||||
iotOCIImgType,
|
||||
iotInstallerImgType,
|
||||
iotRawImgType,
|
||||
)
|
||||
|
||||
s390x.addImageTypes(nil)
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ func TestImageType_Name(t *testing.T) {
|
|||
"fedora-iot-commit",
|
||||
"fedora-iot-container",
|
||||
"fedora-iot-installer",
|
||||
"fedora-iot-raw-image",
|
||||
"oci",
|
||||
},
|
||||
},
|
||||
|
|
@ -290,6 +291,7 @@ func TestImageType_Name(t *testing.T) {
|
|||
"fedora-iot-commit",
|
||||
"fedora-iot-container",
|
||||
"fedora-iot-installer",
|
||||
"fedora-iot-raw-image",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -445,6 +447,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"fedora-iot-commit",
|
||||
"fedora-iot-container",
|
||||
"fedora-iot-installer",
|
||||
"fedora-iot-raw-image",
|
||||
"oci",
|
||||
"container",
|
||||
},
|
||||
|
|
@ -458,6 +461,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"fedora-iot-commit",
|
||||
"fedora-iot-container",
|
||||
"fedora-iot-installer",
|
||||
"fedora-iot-raw-image",
|
||||
"oci",
|
||||
"container",
|
||||
},
|
||||
|
|
@ -551,7 +555,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
|
|||
for _, imgTypeName := range arch.ListImageTypes() {
|
||||
imgType, _ := arch.GetImageType(imgTypeName)
|
||||
_, err := imgType.Manifest(bp.Customizations, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" {
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" || imgTypeName == "fedora-iot-raw-image" {
|
||||
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
|
||||
} else if imgTypeName == "fedora-iot-installer" {
|
||||
continue
|
||||
|
|
@ -580,7 +584,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
|
|||
imgType, _ := arch.GetImageType(imgTypeName)
|
||||
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
|
||||
_, err := imgType.Manifest(bp.Customizations, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" {
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" || imgTypeName == "fedora-iot-raw-image" {
|
||||
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
|
||||
} else if imgTypeName == "fedora-iot-installer" {
|
||||
continue
|
||||
|
|
@ -716,7 +720,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
|
|||
for _, imgTypeName := range arch.ListImageTypes() {
|
||||
imgType, _ := arch.GetImageType(imgTypeName)
|
||||
_, err := imgType.Manifest(bp.Customizations, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" {
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" || imgTypeName == "fedora-iot-raw-image" {
|
||||
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
|
||||
} else if imgTypeName == "fedora-iot-installer" {
|
||||
continue
|
||||
|
|
@ -745,7 +749,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
|
|||
imgType, _ := arch.GetImageType(imgTypeName)
|
||||
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
|
||||
_, err := imgType.Manifest(bp.Customizations, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" {
|
||||
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" || imgTypeName == "fedora-iot-raw-image" {
|
||||
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
|
||||
} else if imgTypeName == "fedora-iot-installer" {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue