manifest: remove Content field from manifest
Do not expose the content of the manifest statically and instead rely on the public methods to retrieve source specifications dynamically. Since the methods require iterating through the pipelines to collect source specifications, we should avoid calling the function multiple times when we can reuse the returned values.
This commit is contained in:
parent
cecbc97e06
commit
5dba246813
20 changed files with 45 additions and 82 deletions
|
|
@ -64,7 +64,7 @@ func TestCrossArchDepsolve(t *testing.T) {
|
|||
repos[archStr], 0)
|
||||
assert.NoError(t, err)
|
||||
|
||||
for _, set := range manifest.Content.PackageSets {
|
||||
for _, set := range manifest.GetPackageSetChains() {
|
||||
_, err = solver.Depsolve(set)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ func TestDepsolvePackageSets(t *testing.T) {
|
|||
|
||||
manifestSource, _, err := qcow2Image.Manifest(&blueprint.Blueprint{Packages: []blueprint.Package{{Name: "bind"}}}, distro.ImageOptions{}, x86Repos, 0)
|
||||
require.Nilf(t, err, "failed to initialise manifest for %q image type of %q/%q distro/arch", qcow2ImageTypeName, cs9.Name(), platform.ARCH_X86_64.String())
|
||||
imagePkgSets := manifestSource.Content.PackageSets
|
||||
imagePkgSets := manifestSource.GetPackageSetChains()
|
||||
|
||||
gotPackageSpecsSets := make(map[string][]rpmmd.PackageSpec, len(imagePkgSets))
|
||||
for name, pkgSet := range imagePkgSets {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue