store: remove unused arguments from PushCompose
This commit is contained in:
parent
e516180640
commit
eb10cf3124
4 changed files with 5 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ func TestCreate(t *testing.T) {
|
||||||
store := store.New(nil)
|
store := store.New(nil)
|
||||||
api := jobqueue.New(nil, store)
|
api := jobqueue.New(nil, store)
|
||||||
|
|
||||||
err = store.PushCompose(distroStruct, arch, imageType, id, &blueprint.Blueprint{}, nil, nil, nil, 0, nil)
|
err = store.PushCompose(imageType, id, &blueprint.Blueprint{}, nil, nil, nil, 0, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("error pushing compose: %v", err)
|
t.Fatalf("error pushing compose: %v", err)
|
||||||
}
|
}
|
||||||
|
|
@ -76,7 +76,7 @@ func testUpdateTransition(t *testing.T, from, to string, expectedStatus int, exp
|
||||||
api := jobqueue.New(nil, store)
|
api := jobqueue.New(nil, store)
|
||||||
|
|
||||||
if from != "VOID" {
|
if from != "VOID" {
|
||||||
err := store.PushCompose(distroStruct, arch, imageType, id, &blueprint.Blueprint{}, nil, nil, nil, 0, nil)
|
err := store.PushCompose(imageType, id, &blueprint.Blueprint{}, nil, nil, nil, 0, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("error pushing compose: %v", err)
|
t.Fatalf("error pushing compose: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ func (api *API) submit(writer http.ResponseWriter, request *http.Request, _ http
|
||||||
// Push the requested compose to the store
|
// Push the requested compose to the store
|
||||||
composeUUID := uuid.New()
|
composeUUID := uuid.New()
|
||||||
// nil is used as an upload target, because LocalTarget is already used in the PushCompose function
|
// nil is used as an upload target, because LocalTarget is already used in the PushCompose function
|
||||||
err = api.store.PushCompose(distro, arch, imageType, composeUUID, &blueprint.Blueprint{}, repoConfigs, packages, buildPackages, 0, nil)
|
err = api.store.PushCompose(imageType, composeUUID, &blueprint.Blueprint{}, repoConfigs, packages, buildPackages, 0, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if api.logger != nil {
|
if api.logger != nil {
|
||||||
api.logger.Println("RCM API failed to push compose:", err)
|
api.logger.Println("RCM API failed to push compose:", err)
|
||||||
|
|
|
||||||
|
|
@ -553,7 +553,7 @@ func (s *Store) getImageBuildDirectory(composeID uuid.UUID, imageBuildID int) st
|
||||||
return fmt.Sprintf("%s/%d", s.getComposeDirectory(composeID), imageBuildID)
|
return fmt.Sprintf("%s/%d", s.getComposeDirectory(composeID), imageBuildID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Store) PushCompose(distro distro.Distro, arch distro.Arch, imageType distro.ImageType, composeID uuid.UUID, bp *blueprint.Blueprint, repos []rpmmd.RepoConfig, packages, buildPackages []rpmmd.PackageSpec, size uint64, targets []*target.Target) error {
|
func (s *Store) PushCompose(imageType distro.ImageType, composeID uuid.UUID, bp *blueprint.Blueprint, repos []rpmmd.RepoConfig, packages, buildPackages []rpmmd.PackageSpec, size uint64, targets []*target.Target) error {
|
||||||
if targets == nil {
|
if targets == nil {
|
||||||
targets = []*target.Target{}
|
targets = []*target.Target{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1463,7 +1463,7 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request
|
||||||
Status: true,
|
Status: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = api.store.PushCompose(api.distro, api.arch, imageType, reply.BuildID, bp, api.allRepositories(), packages, buildPackages, cr.Size, targets)
|
err = api.store.PushCompose(imageType, reply.BuildID, bp, api.allRepositories(), packages, buildPackages, cr.Size, targets)
|
||||||
|
|
||||||
// TODO: we should probably do some kind of blueprint validation in future
|
// TODO: we should probably do some kind of blueprint validation in future
|
||||||
// for now, let's just 500 and bail out
|
// for now, let's just 500 and bail out
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue