Port osbuild/images v0.33.0 with dot-notation to composer
Update the osbuild/images to the version which introduces "dot notation" for distro release versions. - Replace all uses of distroregistry by distrofactory. - Delete local version of reporegistry and use the one from the osbuild/images. - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single `createTestWeldrAPI()` function`. - store/fixture: rework fixtures to allow overriding the host distro name and host architecture name. A cleanup function to restore the host distro and arch names is always part of the fixture struct. - Delete `distro_mock` package, since it is no longer used. - Bump the required version of osbuild to 98, because the OSCAP customization is using the 'compress_results' stage option, which is not available in older versions of osbuild. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
f6ff8c40dd
commit
625b1578fa
1166 changed files with 154457 additions and 5508 deletions
|
|
@ -3,7 +3,7 @@ package cloudapi
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/osbuild/images/pkg/distroregistry"
|
||||
"github.com/osbuild/images/pkg/distrofactory"
|
||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||
|
||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
|
|
@ -13,7 +13,7 @@ type Server struct {
|
|||
v2 *v2.Server
|
||||
}
|
||||
|
||||
func NewServer(workers *worker.Server, distros *distroregistry.Registry, config v2.ServerConfig) *Server {
|
||||
func NewServer(workers *worker.Server, distros *distrofactory.Factory, config v2.ServerConfig) *Server {
|
||||
server := &Server{
|
||||
v2: v2.NewServer(workers, distros, config),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package v2
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/distro/rhel9"
|
||||
"github.com/osbuild/images/pkg/distro/test_distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
|
|
@ -14,7 +15,8 @@ import (
|
|||
)
|
||||
|
||||
func TestImageRequestSize(t *testing.T) {
|
||||
distro := test_distro.New()
|
||||
distro := test_distro.DistroFactory(test_distro.TestDistro1Name)
|
||||
require.NotNil(t, distro)
|
||||
arch, err := distro.GetArch(test_distro.TestArchName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -135,8 +137,9 @@ func TestGetOstreeOptions(t *testing.T) {
|
|||
func TestGetTargets(t *testing.T) {
|
||||
at := assert.New(t)
|
||||
|
||||
r9 := rhel9.NewRHEL93()
|
||||
arch, err := r9.GetArch("x86_64")
|
||||
r9 := rhel9.DistroFactory("rhel-9.3")
|
||||
require.NotNil(t, r9)
|
||||
arch, err := r9.GetArch(arch.ARCH_X86_64.String())
|
||||
at.NoError(err)
|
||||
|
||||
cr := &ComposeRequest{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
"github.com/osbuild/images/pkg/container"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distroregistry"
|
||||
"github.com/osbuild/images/pkg/distrofactory"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/ostree"
|
||||
"github.com/osbuild/osbuild-composer/internal/auth"
|
||||
|
|
@ -36,7 +36,7 @@ import (
|
|||
// Server represents the state of the cloud Server
|
||||
type Server struct {
|
||||
workers *worker.Server
|
||||
distros *distroregistry.Registry
|
||||
distros *distrofactory.Factory
|
||||
config ServerConfig
|
||||
router routers.Router
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ type ServerConfig struct {
|
|||
JWTEnabled bool
|
||||
}
|
||||
|
||||
func NewServer(workers *worker.Server, distros *distroregistry.Registry, config ServerConfig) *Server {
|
||||
func NewServer(workers *worker.Server, distros *distrofactory.Factory, config ServerConfig) *Server {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
spec, err := GetSwagger()
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -92,7 +92,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -136,7 +136,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -179,7 +179,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -224,7 +224,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -280,7 +280,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -328,7 +328,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
},
|
||||
buildResult: worker.OSBuildJobResult{
|
||||
Arch: test_distro.TestArchName,
|
||||
HostOS: test_distro.TestDistroName,
|
||||
HostOS: test_distro.TestDistro1Name,
|
||||
TargetResults: []*target.TargetResult{target.NewKojiTargetResult(&target.KojiTargetResultOptions{
|
||||
Image: &target.KojiOutputInfo{
|
||||
Filename: "test.img",
|
||||
|
|
@ -407,7 +407,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
"release":"%[6]s",
|
||||
"task_id": 42
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage), name, version, release),
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage), name, version, release),
|
||||
c.composeReplyCode, c.composeReply, "id", "operation_id")
|
||||
|
||||
// determine the compose ID from the reply
|
||||
|
|
@ -477,7 +477,7 @@ func TestKojiCompose(t *testing.T) {
|
|||
"success": true
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestArch3Name, test_distro.TestDistroName)
|
||||
}`, test_distro.TestArch3Name, test_distro.TestDistro1Name)
|
||||
}
|
||||
|
||||
test.TestRoute(t, workerHandler, false, "PATCH", fmt.Sprintf("/api/worker/v1/jobs/%v", token), buildJobResult, http.StatusOK,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/pkg/jobqueue"
|
||||
|
||||
"github.com/osbuild/images/pkg/distro/test_distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
"github.com/osbuild/osbuild-composer/internal/test"
|
||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||
)
|
||||
|
|
@ -43,7 +43,7 @@ func kojiRequest() string {
|
|||
"version":"1",
|
||||
"release":"2"
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage))
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage))
|
||||
}
|
||||
|
||||
func s3Request() string {
|
||||
|
|
@ -64,7 +64,7 @@ func s3Request() string {
|
|||
}
|
||||
}
|
||||
]
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage))
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage))
|
||||
}
|
||||
|
||||
var reqContextCallCount = 0
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/pkg/jobqueue"
|
||||
|
||||
"github.com/osbuild/images/pkg/distro/test_distro"
|
||||
"github.com/osbuild/images/pkg/distrofactory"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
"github.com/osbuild/images/pkg/ostree/mock_ostree_repo"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
"github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue"
|
||||
distro_mock "github.com/osbuild/osbuild-composer/internal/mocks/distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/target"
|
||||
"github.com/osbuild/osbuild-composer/internal/test"
|
||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||
|
|
@ -31,8 +31,7 @@ func newV2Server(t *testing.T, dir string, depsolveChannels []string, enableJWT
|
|||
require.NoError(t, err)
|
||||
workerServer := worker.NewServer(nil, q, worker.Config{BasePath: "/api/worker/v1", JWTEnabled: enableJWT, TenantProviderFields: []string{"rh-org-id", "account_id"}})
|
||||
|
||||
distros, err := distro_mock.NewDefaultRegistry()
|
||||
require.NoError(t, err)
|
||||
distros := distrofactory.NewTestDefault()
|
||||
require.NotNil(t, distros)
|
||||
|
||||
config := v2.ServerConfig{
|
||||
|
|
@ -50,7 +49,7 @@ func newV2Server(t *testing.T, dir string, depsolveChannels []string, enableJWT
|
|||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
_, token, _, _, _, err := workerServer.RequestJob(depsolveContext, test_distro.TestDistroName, []string{worker.JobTypeDepsolve}, depsolveChannels, uuid.Nil)
|
||||
_, token, _, _, _, err := workerServer.RequestJob(depsolveContext, test_distro.TestArchName, []string{worker.JobTypeDepsolve}, depsolveChannels, uuid.Nil)
|
||||
select {
|
||||
case <-depsolveContext.Done():
|
||||
return
|
||||
|
|
@ -87,7 +86,7 @@ func newV2Server(t *testing.T, dir string, depsolveChannels []string, enableJWT
|
|||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
_, token, _, _, _, err := workerServer.RequestJob(ostreeResolveContext, test_distro.TestDistroName, []string{worker.JobTypeOSTreeResolve}, depsolveChannels, uuid.Nil)
|
||||
_, token, _, _, _, err := workerServer.RequestJob(ostreeResolveContext, test_distro.TestDistro1Name, []string{worker.JobTypeOSTreeResolve}, depsolveChannels, uuid.Nil)
|
||||
select {
|
||||
case <-ostreeResolveContext.Done():
|
||||
return
|
||||
|
|
@ -189,8 +188,10 @@ func TestCompose(t *testing.T) {
|
|||
srv, _, _, cancel := newV2Server(t, t.TempDir(), []string{""}, false, false)
|
||||
defer cancel()
|
||||
|
||||
testDistro := test_distro.DistroFactory(test_distro.TestDistro1Name)
|
||||
require.NotNil(t, testDistro)
|
||||
// create two ostree repos, one to serve the default test_distro ref (for fallback tests) and one to serve a custom ref
|
||||
ostreeRepoDefault := mock_ostree_repo.Setup(test_distro.New().OSTreeRef())
|
||||
ostreeRepoDefault := mock_ostree_repo.Setup(testDistro.OSTreeRef())
|
||||
defer ostreeRepoDefault.TearDown()
|
||||
ostreeRepoOther := mock_ostree_repo.Setup("some/other/ref")
|
||||
defer ostreeRepoOther.TearDown()
|
||||
|
|
@ -235,7 +236,7 @@ func TestCompose(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName), http.StatusBadRequest, `
|
||||
}`, testDistro.Name()), http.StatusBadRequest, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/errors/5",
|
||||
"id": "5",
|
||||
|
|
@ -259,7 +260,7 @@ func TestCompose(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusBadRequest, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusBadRequest, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/errors/30",
|
||||
"id": "30",
|
||||
|
|
@ -283,7 +284,7 @@ func TestCompose(t *testing.T) {
|
|||
// "region": "eu-central-1"
|
||||
// }
|
||||
// }]
|
||||
// }`, test_distro.TestDistroName, test_distro.TestArch3Name, test_distro.TestImageTypeName), http.StatusMethodNotAllowed, `
|
||||
// }`, testDistro.Name(), test_distro.TestArch3Name, test_distro.TestImageTypeName), http.StatusMethodNotAllowed, `
|
||||
// {
|
||||
// "href": "/api/image-builder-composer/v2/errors/22",
|
||||
// "id": "22",
|
||||
|
|
@ -307,7 +308,7 @@ func TestCompose(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -331,7 +332,7 @@ func TestCompose(t *testing.T) {
|
|||
}
|
||||
}]
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -358,7 +359,7 @@ func TestCompose(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -383,7 +384,7 @@ func TestCompose(t *testing.T) {
|
|||
"rhsm": false
|
||||
}]
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -409,7 +410,7 @@ func TestCompose(t *testing.T) {
|
|||
"ref": "rhel/10/x86_64/edge"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -439,7 +440,7 @@ func TestCompose(t *testing.T) {
|
|||
"ref": "rhel/10/x86_64/edge"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -463,7 +464,7 @@ func TestCompose(t *testing.T) {
|
|||
"url": "%s"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -488,7 +489,7 @@ func TestCompose(t *testing.T) {
|
|||
"url": "%s"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, ostreeRepoDefault.OSTreeRef, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name, ostreeRepoDefault.OSTreeRef, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -513,7 +514,7 @@ func TestCompose(t *testing.T) {
|
|||
"url": "%s"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, ostreeRepoDefault.OSTreeRef, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name, ostreeRepoDefault.OSTreeRef, ostreeRepoDefault.Server.URL), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -539,7 +540,7 @@ func TestCompose(t *testing.T) {
|
|||
"ref": "a/new/ref"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, ostreeRepoOther.OSTreeRef, ostreeRepoOther.Server.URL), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name, ostreeRepoOther.OSTreeRef, ostreeRepoOther.Server.URL), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -567,7 +568,7 @@ func TestCompose(t *testing.T) {
|
|||
"rhsm": true
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, ostreeRepoOther.OSTreeRef, ostreeRepoOther.Server.URL, fmt.Sprintf("%s/content", ostreeRepoOther.Server.URL)), http.StatusCreated, `
|
||||
}`, testDistro.Name(), test_distro.TestArch3Name, ostreeRepoOther.OSTreeRef, ostreeRepoOther.Server.URL, fmt.Sprintf("%s/content", ostreeRepoOther.Server.URL)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -592,7 +593,7 @@ func TestComposeStatusSuccess(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -703,7 +704,7 @@ func TestComposeStatusFailure(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -774,7 +775,7 @@ func TestComposeJobError(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -839,7 +840,7 @@ func TestComposeDependencyError(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -912,7 +913,7 @@ func TestComposeTargetErrors(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1085,7 +1086,7 @@ func TestComposeCustomizations(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1121,7 +1122,7 @@ func TestComposeRhcSubscription(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1148,7 +1149,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"share_with_accounts": ["123456789012","234567890123"]
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesAws)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesAws)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1169,7 +1170,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"share_with_accounts": ["123456789012","234567890123"]
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesAws)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesAws)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1188,7 +1189,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesEdgeCommit)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesEdgeCommit)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1207,7 +1208,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesEdgeInstaller)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesEdgeInstaller)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1229,7 +1230,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"location": "westeurope"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesAzure)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesAzure)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1250,7 +1251,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"share_with_accounts": ["user:alice@example.com"]
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesGcp)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesGcp)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1269,7 +1270,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesImageInstaller)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesImageInstaller)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1288,7 +1289,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesGuestImage)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1307,7 +1308,7 @@ func TestImageTypes(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name, string(v2.ImageTypesVsphere)), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name, string(v2.ImageTypesVsphere)), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
@ -1332,7 +1333,7 @@ func TestImageFromCompose(t *testing.T) {
|
|||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
}`, test_distro.TestDistroName, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
}`, test_distro.TestDistro1Name, test_distro.TestArch3Name), http.StatusCreated, `
|
||||
{
|
||||
"href": "/api/image-builder-composer/v2/compose",
|
||||
"kind": "ComposeId"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue