worker: NewServer: move config parameters to a new Config struct

We will have more parameters soon so let's make this prettier sooner rather
than later.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2022-03-03 14:37:21 +01:00 committed by Ondřej Budai
parent 9feb7b59d6
commit c1dc58eba4
5 changed files with 49 additions and 32 deletions

View file

@ -57,7 +57,7 @@ func createBaseWorkersFixture(tmpdir string) *worker.Server {
if err != nil {
panic(err)
}
return worker.NewServer(nil, q, "", time.Duration(0), "/api/worker/v1")
return worker.NewServer(nil, q, worker.Config{BasePath: "/api/worker/v1"})
}
func createBaseDepsolveFixture() []rpmmd.PackageSpec {