distro/Manifest: generalize the size argument
When generating an osbuild manifest for an image type, we take a customizations struct, which specifies the image-type-independent customizations to apply. We also take the size argument, which is specific to the image build and not part of the blueprint. Introduce a new argument ImageOptions, which for now just wraps the size argument. These options are specific to the image build/type, and therefore does not belong with the other customizations. For now this is a non-functional change, but follow-up commits will introduce more types of image options. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
a544fa7eb6
commit
0b3702cb19
12 changed files with 61 additions and 36 deletions
|
|
@ -82,10 +82,12 @@ func TestDistro_Manifest(t *testing.T, pipelinePath string, prefix string, distr
|
|||
return
|
||||
}
|
||||
got, err := imageType.Manifest(tt.ComposeRequest.Blueprint.Customizations,
|
||||
distro.ImageOptions{
|
||||
Size: imageType.Size(0),
|
||||
},
|
||||
repos,
|
||||
tt.RpmMD.Packages,
|
||||
tt.RpmMD.BuildPackages,
|
||||
imageType.Size(0))
|
||||
tt.RpmMD.BuildPackages)
|
||||
|
||||
if (err == nil && tt.Manifest == nil) || (err != nil && tt.Manifest != nil) {
|
||||
t.Errorf("distro.Manifest() error = %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue