cloudapi: Pass the RepoRegistry to the cloudapi Server
This commit is contained in:
parent
b8967d53bc
commit
01ba674cac
4 changed files with 16 additions and 6 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
"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/reporegistry"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
"github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue"
|
||||
|
|
@ -34,11 +35,16 @@ func newV2Server(t *testing.T, dir string, depsolveChannels []string, enableJWT
|
|||
distros := distrofactory.NewTestDefault()
|
||||
require.NotNil(t, distros)
|
||||
|
||||
// TODO pass it a real path?
|
||||
repos, err := reporegistry.NewTestedDefault()
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, repos)
|
||||
|
||||
config := v2.ServerConfig{
|
||||
JWTEnabled: enableJWT,
|
||||
TenantProviderFields: []string{"rh-org-id", "account_id"},
|
||||
}
|
||||
v2Server := v2.NewServer(workerServer, distros, config)
|
||||
v2Server := v2.NewServer(workerServer, distros, repos, config)
|
||||
require.NotNil(t, v2Server)
|
||||
t.Cleanup(v2Server.Shutdown)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue