jobqueue: add channel to workers
Stores the channel alongside the worker.
This commit is contained in:
parent
ede798ae6c
commit
1b4935c325
9 changed files with 46 additions and 26 deletions
|
|
@ -1338,7 +1338,7 @@ func TestCompose(t *testing.T) {
|
|||
api, sf := createTestWeldrAPI(t.TempDir(), test_distro.TestDistro1Name, test_distro.TestArchName, rpmmd_mock.NoComposesFixture, nil)
|
||||
t.Cleanup(sf.Cleanup)
|
||||
|
||||
_, err = api.workers.RegisterWorker(arch.Name())
|
||||
_, err = api.workers.RegisterWorker("", arch.Name())
|
||||
require.NoError(t, err)
|
||||
test.TestRoute(t, api, c.External, c.Method, c.Path, c.Body, c.ExpectedStatus, c.ExpectedJSON, c.IgnoreFields...)
|
||||
|
||||
|
|
@ -2329,7 +2329,7 @@ func TestComposePOST_ImageTypeDenylist(t *testing.T) {
|
|||
t.Run(fmt.Sprintf("case %d", idx), func(t *testing.T) {
|
||||
api, sf := createTestWeldrAPI(t.TempDir(), distro2.Name(), arch.Name(), rpmmd_mock.NoComposesFixture, c.imageTypeDenylist)
|
||||
t.Cleanup(sf.Cleanup)
|
||||
_, err = api.workers.RegisterWorker(arch.Name())
|
||||
_, err = api.workers.RegisterWorker("", arch.Name())
|
||||
require.NoError(t, err)
|
||||
test.TestRoute(t, api, true, "POST", c.Path, c.Body, c.ExpectedStatus, c.ExpectedJSON, c.IgnoreFields...)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ func TestComposeStatusFromLegacyError(t *testing.T) {
|
|||
t.Fatalf("error serializing osbuild manifest: %v", err)
|
||||
}
|
||||
|
||||
_, err = api.workers.RegisterWorker(arch.Name())
|
||||
_, err = api.workers.RegisterWorker("", arch.Name())
|
||||
require.NoError(t, err)
|
||||
jobId, err := api.workers.EnqueueOSBuild(arch.Name(), &worker.OSBuildJob{Manifest: mf}, "")
|
||||
require.NoError(t, err)
|
||||
|
|
@ -99,7 +99,7 @@ func TestComposeStatusFromJobError(t *testing.T) {
|
|||
t.Fatalf("error serializing osbuild manifest: %v", err)
|
||||
}
|
||||
|
||||
_, err = api.workers.RegisterWorker(arch.Name())
|
||||
_, err = api.workers.RegisterWorker("", arch.Name())
|
||||
require.NoError(t, err)
|
||||
jobId, err := api.workers.EnqueueOSBuild(arch.Name(), &worker.OSBuildJob{Manifest: mf}, "")
|
||||
require.NoError(t, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue