remove packages from weldr API initialization
The package list is generated on each request for a package so there is no longer a need to generate the package list in main or to store these packages in the API object.
This commit is contained in:
parent
6f4a7bacd2
commit
c882bebfb4
3 changed files with 8 additions and 19 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/mocks/rpmmd"
|
||||
rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/store"
|
||||
"github.com/osbuild/osbuild-composer/internal/weldr"
|
||||
|
|
@ -159,13 +159,8 @@ func testRoute(t *testing.T, api *weldr.API, external bool, method, path, body s
|
|||
func createWeldrAPI(fixture rpmmd_mock.Fixture) (*weldr.API, *store.Store) {
|
||||
s := store.New(nil)
|
||||
rpm := rpmmd_mock.NewRPMMDMock(fixture)
|
||||
packageList, err := rpm.FetchPackageList([]rpmmd.RepoConfig{repo})
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return weldr.New(rpm, repo, packageList, nil, s), s
|
||||
return weldr.New(rpm, repo, nil, s), s
|
||||
}
|
||||
|
||||
func TestBasic(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue