distro: add containers arg to ImageType.Manifest
This is the first step to support embedding container images. Here we add the `containers []container.Spec` argument to supply images with resolved container specifications. For now all distros will return an error in case a container is actually supplied since none of them currently support embedding containers. NB: also no apis or tools will actually resolve containers.
This commit is contained in:
parent
f8804358a4
commit
7f3f016ed1
21 changed files with 95 additions and 62 deletions
|
|
@ -2337,6 +2337,7 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request
|
|||
options,
|
||||
imageRepos,
|
||||
packageSets,
|
||||
nil,
|
||||
seed)
|
||||
if err != nil {
|
||||
errors := responseError{
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ func TestCompose(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
imgType, err := arch.GetImageType(test_distro.TestImageTypeName)
|
||||
require.NoError(t, err)
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, 0)
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
expectedComposeLocal := &store.Compose{
|
||||
|
|
@ -775,7 +775,7 @@ func TestCompose(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
imgType2, err := arch2.GetImageType(test_distro.TestImageTypeName)
|
||||
require.NoError(t, err)
|
||||
manifest2, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, 0)
|
||||
manifest2, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
expectedComposeGoodDistro := &store.Compose{
|
||||
|
|
@ -1717,7 +1717,7 @@ func TestComposePOST_ImageTypeDenylist(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
imgType2, err := arch.GetImageType(test_distro.TestImageType2Name)
|
||||
require.NoError(t, err)
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, 0)
|
||||
manifest, err := imgType.Manifest(nil, distro.ImageOptions{}, nil, nil, nil, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
expectedComposeLocal := &store.Compose{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func TestComposeStatusFromLegacyError(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("error getting image type from arch: %v", err)
|
||||
}
|
||||
manifest, err := imageType.Manifest(nil, distro.ImageOptions{Size: imageType.Size(0)}, nil, nil, 0)
|
||||
manifest, err := imageType.Manifest(nil, distro.ImageOptions{Size: imageType.Size(0)}, nil, nil, nil, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating osbuild manifest: %v", err)
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ func TestComposeStatusFromJobError(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("error getting image type from arch: %v", err)
|
||||
}
|
||||
manifest, err := imageType.Manifest(nil, distro.ImageOptions{Size: imageType.Size(0)}, nil, nil, 0)
|
||||
manifest, err := imageType.Manifest(nil, distro.ImageOptions{Size: imageType.Size(0)}, nil, nil, nil, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating osbuild manifest: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue