distro: allow to return warnings in the Manifest function
This changes the `Manifest` function of the `ImageType` interface so that any warnings detected during the `checkOptions` step of the manifest initialization can be propagated back to the Weldr-API (see next commit). Signed-off-by: Irene Diez <idiez@redhat.com>
This commit is contained in:
parent
d952e41161
commit
8022c227ba
8 changed files with 22 additions and 21 deletions
|
|
@ -51,7 +51,7 @@ func FixtureBase() *Store {
|
|||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to get image type %s for a test distro architecture: %v", test_distro.TestImageTypeName, err))
|
||||
}
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
manifest, _, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to create a manifest: %v", err))
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ func FixtureFinished() *Store {
|
|||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to get image type %s for a test distro architecture: %v", test_distro.TestImageTypeName, err))
|
||||
}
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
manifest, _, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to create a manifest: %v", err))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ func (suite *storeTest) SetupSuite() {
|
|||
suite.myDistro = test_distro.New()
|
||||
suite.myArch, _ = suite.myDistro.GetArch(test_distro.TestArchName)
|
||||
suite.myImageType, _ = suite.myArch.GetImageType(test_distro.TestImageTypeName)
|
||||
suite.myManifest, _ = suite.myImageType.Manifest(&suite.myCustomizations, suite.myImageOptions, suite.myRepoConfig, nil, nil, 0)
|
||||
suite.myManifest, _, _ = suite.myImageType.Manifest(&suite.myCustomizations, suite.myImageOptions, suite.myRepoConfig, nil, nil, 0)
|
||||
suite.mySourceConfig = SourceConfig{
|
||||
Name: "testSourceConfig",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue