distro/test: use new interfaces
Test in terms of the newly introduced interfaces. This should not have any functional effect. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
5de98458e5
commit
7fe3421afb
1 changed files with 12 additions and 5 deletions
|
|
@ -66,14 +66,21 @@ func TestDistro_Manifest(t *testing.T) {
|
|||
t.Errorf("unknown distro: %v", tt.ComposeRequest.Distro)
|
||||
return
|
||||
}
|
||||
size := d.GetSizeForOutputType(tt.ComposeRequest.OutputFormat, 0)
|
||||
got, err := d.Manifest(tt.ComposeRequest.Blueprint.Customizations,
|
||||
arch, err := d.GetArch(tt.ComposeRequest.Arch)
|
||||
if err != nil {
|
||||
t.Errorf("unknown arch: %v", tt.ComposeRequest.Arch)
|
||||
return
|
||||
}
|
||||
imageType, err := arch.GetImageType(tt.ComposeRequest.OutputFormat)
|
||||
if err != nil {
|
||||
t.Errorf("unknown image type: %v", tt.ComposeRequest.OutputFormat)
|
||||
return
|
||||
}
|
||||
got, err := imageType.Manifest(tt.ComposeRequest.Blueprint.Customizations,
|
||||
repoMap[tt.ComposeRequest.Arch],
|
||||
tt.RpmMD.Packages,
|
||||
tt.RpmMD.BuildPackages,
|
||||
tt.ComposeRequest.Arch,
|
||||
tt.ComposeRequest.OutputFormat,
|
||||
size)
|
||||
imageType.Size(0))
|
||||
if (err != nil) != (tt.Manifest == nil) {
|
||||
t.Errorf("distro.Manifest() error = %v", err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue