worker/server: job status struct
The number of return values from the `jobStatus` function was growing and getting out of hand. Not all return values were being used in all cases and so returning a single struct with the information and status of a job makes more sense. Then in each case the resulting fields can be used as needed.
This commit is contained in:
parent
9f4e765657
commit
967ac1c35e
7 changed files with 128 additions and 115 deletions
|
|
@ -458,9 +458,9 @@ func TestKojiCompose(t *testing.T) {
|
|||
// Finishing of the goroutine handling the manifest job is not deterministic and as a result, we may get
|
||||
// the second osbuild job first.
|
||||
// The build jobs ID is determined from the dependencies of the koji-finalize job dependencies.
|
||||
_, finalizeJobDeps, err := workerServer.KojiFinalizeJobStatus(composeId, &worker.KojiFinalizeJobResult{})
|
||||
finalizeInfo, err := workerServer.KojiFinalizeJobStatus(composeId, &worker.KojiFinalizeJobResult{})
|
||||
require.NoError(t, err)
|
||||
buildJobIDs := finalizeJobDeps[1:]
|
||||
buildJobIDs := finalizeInfo.Deps[1:]
|
||||
require.Len(t, buildJobIDs, 2)
|
||||
|
||||
// handle build jobs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue