distro: remove usage of ImageType.PackageSets() from tests

Use the new manifest generation procedure in the distro tests.

Use assert instead of require in TestImageTypePipelineNames to continue
running the rest of the subtests after a failure.

Some initialisations (image options and blueprint customizations) had to
be adjusted to work with the ImageType.Manifest() function.

Some helper functions in distro_test_common are no longer necessary and
have been removed.

The TestPipelineRepositories and TestImageTypePipelineNames tests must
be (partially) skipped for image types which specify a workload
(currently only azure-eap7-rhui), because they ignore payload
repositories.
This commit is contained in:
Achilleas Koutsou 2023-05-10 00:33:41 +02:00 committed by Simon de Vlieger
parent d0ba17cfe1
commit b24a8cdcf5
6 changed files with 95 additions and 115 deletions

View file

@ -44,13 +44,25 @@ func TestImageType_PackageSetsChains(t *testing.T) {
imageType, err := arch.GetImageType(imageTypeName)
require.Nil(t, err)
imagePkgSets := imageType.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{
// set up bare minimum args for image type
var customizations *blueprint.Customizations
if imageType.Name() == "edge-simplified-installer" {
customizations = &blueprint.Customizations{
InstallationDevice: "/dev/null",
}
}
bp := blueprint.Blueprint{
Customizations: customizations,
}
manifest, _, err := imageType.Manifest(&bp, distro.ImageOptions{
OSTree: &ostree.ImageOptions{
URL: "foo",
ImageRef: "bar",
FetchChecksum: "baz",
},
}, nil)
}, nil, nil, nil, 0)
require.NoError(t, err)
imagePkgSets := manifest.Content.PackageSets
for packageSetName := range imageType.PackageSetsChains() {
_, ok := imagePkgSets[packageSetName]
if !ok {
@ -96,17 +108,17 @@ func TestImageTypePipelineNames(t *testing.T) {
Pipelines []pipeline `json:"pipelines"`
}
require := require.New(t)
assert := assert.New(t)
distros := distroregistry.NewDefault()
for _, distroName := range distros.List() {
d := distros.GetDistro(distroName)
for _, archName := range d.ListArches() {
arch, err := d.GetArch(archName)
require.Nil(err)
assert.Nil(err)
for _, imageTypeName := range arch.ListImageTypes() {
t.Run(fmt.Sprintf("%s/%s/%s", distroName, archName, imageTypeName), func(t *testing.T) {
imageType, err := arch.GetImageType(imageTypeName)
require.Nil(err)
assert.Nil(err)
// set up bare minimum args for image type
var customizations *blueprint.Customizations
@ -155,37 +167,46 @@ func TestImageTypePipelineNames(t *testing.T) {
packageSets[plName] = minimalPackageSet
}
m, _, err := imageType.Manifest(&bp, options, repos, packageSets, containers, seed)
require.NoError(err)
m, _, err := imageType.Manifest(&bp, options, repos, nil, containers, seed)
assert.NoError(err)
mf, err := m.Serialize(packageSets)
require.NoError(err)
assert.NoError(err)
pm := new(manifest)
err = json.Unmarshal(mf, pm)
require.NoError(err)
assert.NoError(err)
require.Equal(len(allPipelines), len(pm.Pipelines))
assert.Equal(len(allPipelines), len(pm.Pipelines))
for idx := range pm.Pipelines {
// manifest pipeline names should be identical to the ones
// defined in the image type and in the same order
require.Equal(allPipelines[idx], pm.Pipelines[idx].Name)
assert.Equal(allPipelines[idx], pm.Pipelines[idx].Name)
if pm.Pipelines[idx].Name == "os" {
rpmStagePresent := false
for _, s := range pm.Pipelines[idx].Stages {
if s.Type == "org.osbuild.rpm" {
rpmStagePresent = true
require.Equal(repos[0].GPGKeys, s.Options.GPGKeys)
if imageTypeName != "azure-eap7-rhui" {
// NOTE (akoutsou): Ideally, at some point we will
// have a good way of reading what's supported by
// each image type and we can skip or adapt tests
// based on this information. For image types with
// a preset workload, payload packages are ignored
// and dropped and so are the payload
// repo gpg keys.
assert.Equal(repos[0].GPGKeys, s.Options.GPGKeys)
}
}
}
// make sure the gpg keys check was reached
require.True(rpmStagePresent)
assert.True(rpmStagePresent)
}
}
// The last pipeline should match the export pipeline.
// This might change in the future, but for now, let's make
// sure they match.
require.Equal(imageType.Exports()[0], pm.Pipelines[len(pm.Pipelines)-1].Name)
assert.Equal(imageType.Exports()[0], pm.Pipelines[len(pm.Pipelines)-1].Name)
})
}
@ -395,12 +416,21 @@ func TestPipelineRepositories(t *testing.T) {
arch, err := d.GetArch(archName)
require.Nil(err)
for _, imageTypeName := range arch.ListImageTypes() {
if imageTypeName == "azure-eap7-rhui" {
// NOTE (akoutsou): Ideally, at some point we will
// have a good way of reading what's supported by
// each image type and we can skip or adapt tests
// based on this information. For image types with
// a preset workload, payload packages are ignored
// and dropped.
continue
}
t.Run(fmt.Sprintf("%s/%s/%s", distroName, archName, imageTypeName), func(t *testing.T) {
imageType, err := arch.GetImageType(imageTypeName)
require.Nil(err)
// set up bare minimum args for image type
customizations := &blueprint.Customizations{}
var customizations *blueprint.Customizations
if imageType.Name() == "edge-simplified-installer" {
customizations = &blueprint.Customizations{
InstallationDevice: "/dev/null",
@ -422,7 +452,9 @@ func TestPipelineRepositories(t *testing.T) {
}
repos := tCase.repos
packageSets := imageType.PackageSets(bp, options, repos)
manifest, _, err := imageType.Manifest(&bp, options, repos, nil, nil, 0)
require.NoError(err)
packageSets := manifest.Content.PackageSets
var globals stringSet
if len(tCase.result["*"]) > 0 {
@ -455,7 +487,6 @@ func TestPipelineRepositories(t *testing.T) {
// expected set for current package set should be merged with globals
expected := expChain[setIdx]
if !repoNamesSet.Equals(expected) {
t.Errorf("repos for package set %q [idx: %d] %s (distro %q image type %q) do not match expected %s", psName, setIdx, repoNamesSet, d.Name(), imageType.Name(), expected)
}

View file

@ -175,7 +175,11 @@ func TestDistro_Manifest(t *testing.T, pipelinePath string, prefix string, regis
}
func getImageTypePkgSpecSets(imageType distro.ImageType, bp blueprint.Blueprint, options distro.ImageOptions, repos []rpmmd.RepoConfig, cacheDir, dnfJsonPath string) map[string][]rpmmd.PackageSpec {
imgPackageSets := imageType.PackageSets(bp, options, repos)
manifest, _, err := imageType.Manifest(&bp, options, repos, nil, nil, 0)
if err != nil {
panic("Could not generate manifest for package sets: " + err.Error())
}
imgPackageSets := manifest.Content.PackageSets
solver := dnfjson.NewSolver(imageType.Arch().Distro().ModulePlatformID(),
imageType.Arch().Distro().Releasever(),
@ -203,7 +207,16 @@ var knownKernels = []string{"kernel", "kernel-debug", "kernel-rt"}
// Returns the number of known kernels in the package list
func kernelCount(imgType distro.ImageType, bp blueprint.Blueprint) int {
sets := imgType.PackageSets(bp, distro.ImageOptions{}, nil)
ostreeOptions := &ostree.ImageOptions{
URL: "foo",
ImageRef: "bar",
FetchChecksum: "baz",
}
manifest, _, err := imgType.Manifest(&bp, distro.ImageOptions{OSTree: ostreeOptions}, nil, nil, nil, 0)
if err != nil {
panic(err)
}
sets := manifest.Content.PackageSets
// Use a map to count unique kernels in a package set. If the same kernel
// name appears twice, it will only be installed once, so we only count it
@ -316,55 +329,3 @@ func TestDistro_KernelOption(t *testing.T, d distro.Distro) {
}
}
}
// GetTestingPackageSpecSets returns PackageSpecSets useful for unit testing.
//
// A dummy PackageSpec for the provided packageName is added
// to all PackageSpecSets provided in pkgSetNames.
//
// E.g. `kernel` package is a hard requirement of some payload pipelines
// and they panic if it is not found in the packageSpecSets passed to
// Manifest().
func GetTestingPackageSpecSets(packageName, arch string, pkgSetNames []string) map[string][]rpmmd.PackageSpec {
pkgTestingSpec := []rpmmd.PackageSpec{
{
Name: packageName,
Epoch: 0,
Version: "1.2.3",
Release: "2.el123",
Arch: arch,
RemoteLocation: "http://example.org",
Checksum: "lorenipsum",
Secrets: "lorenipsum",
CheckGPG: false,
},
}
testPackageSpecSets := map[string][]rpmmd.PackageSpec{}
for _, pkgSetName := range pkgSetNames {
testPackageSpecSets[pkgSetName] = pkgTestingSpec
}
return testPackageSpecSets
}
// GetTestingImagePackageSpecSets returns PackageSpecSets for all package sets
// defined by the provided ImageType, which is useful for unit testing.
func GetTestingImagePackageSpecSets(packageName string, i distro.ImageType) map[string][]rpmmd.PackageSpec {
arch := i.Arch().Name()
imagePackageSets := make([]string, 0, len(i.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{
OSTree: &ostree.ImageOptions{
URL: "foo",
ImageRef: "bar",
FetchChecksum: "baz",
},
}, nil)))
for pkgSetName := range i.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{
OSTree: &ostree.ImageOptions{
URL: "foo",
ImageRef: "bar",
FetchChecksum: "baz",
},
}, nil) {
imagePackageSets = append(imagePackageSets, pkgSetName)
}
return GetTestingPackageSpecSets(packageName, arch, imagePackageSets)
}

View file

@ -254,7 +254,9 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
buildPkgs := itStruct.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{}, nil)["build"]
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
assert.Len(t, buildPkgs, 1)
assert.ElementsMatch(t, buildPackages[archLabel], buildPkgs[0].Include)
@ -425,8 +427,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "iot-installer" {
@ -606,8 +607,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {
@ -641,8 +641,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if strings.HasPrefix(imgTypeName, "iot-") || strings.HasPrefix(imgTypeName, "image-") {
continue
} else {
@ -680,8 +679,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if strings.HasPrefix(imgTypeName, "iot-") || strings.HasPrefix(imgTypeName, "image-") {
continue
} else {
@ -775,8 +773,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {

View file

@ -117,7 +117,9 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
buildPkgs := itStruct.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{}, nil)["build"]
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
assert.Len(t, buildPkgs, 1)
assert.ElementsMatch(t, buildPackages[archLabel], buildPkgs[0].Include)
@ -177,8 +179,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
assert.NoError(t, err)
}
}
@ -306,8 +307,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
}
}
@ -333,8 +333,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
}
}
@ -368,8 +367,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
}
}
@ -447,8 +445,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
}
}

View file

@ -285,7 +285,9 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
buildPkgs := itStruct.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{}, nil)["build"]
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
assert.Len(t, buildPkgs, 1)
assert.ElementsMatch(t, buildPackages[archLabel], buildPkgs[0].Include)
@ -473,8 +475,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "edge-raw-image" {
@ -691,8 +692,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {
@ -732,8 +732,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if unsupported[imgTypeName] {
assert.Error(t, err)
} else {
@ -779,8 +778,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if unsupported[imgTypeName] {
assert.Error(t, err)
} else {
@ -892,8 +890,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {

View file

@ -270,7 +270,9 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
buildPkgs := itStruct.PackageSets(blueprint.Blueprint{}, distro.ImageOptions{}, nil)["build"]
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
assert.Len(t, buildPkgs, 1)
assert.ElementsMatch(t, buildPackages[archLabel], buildPkgs[0].Include)
@ -456,8 +458,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "edge-raw-image" {
@ -658,8 +659,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {
@ -691,8 +691,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if strings.HasPrefix(imgTypeName, "edge-") {
continue
} else {
@ -730,8 +729,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if strings.HasPrefix(imgTypeName, "edge-") {
continue
} else {
@ -823,8 +821,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, testPackageSpecSets, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {