jobqueue: rename to worker

This package does not contain an actual queue, but a server and client
implementation for osbuild's worker API. Name it accordingly.

The queue is in package `store` right now, but about to be split off.
This rename makes the `jobqueue` name free for that effort.
This commit is contained in:
Lars Karlitski 2020-04-15 23:12:49 +02:00 committed by Tom Gundersen
parent 76bd5ab984
commit ac40b0e73b
6 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
package jobqueue
package worker
import (
"encoding/json"

View file

@ -1,4 +1,4 @@
package jobqueue_test
package worker_test
import (
"net/http"
@ -8,9 +8,9 @@ import (
"github.com/osbuild/osbuild-composer/internal/blueprint"
"github.com/osbuild/osbuild-composer/internal/distro/fedoratest"
"github.com/osbuild/osbuild-composer/internal/jobqueue"
"github.com/osbuild/osbuild-composer/internal/store"
"github.com/osbuild/osbuild-composer/internal/test"
"github.com/osbuild/osbuild-composer/internal/worker"
)
func TestErrors(t *testing.T) {
@ -35,7 +35,7 @@ func TestErrors(t *testing.T) {
}
for _, c := range cases {
api := jobqueue.New(nil, store.New(nil))
api := worker.New(nil, store.New(nil))
test.TestRoute(t, api, false, c.Method, c.Path, c.Body, c.ExpectedStatus, "{}", "message")
}
}
@ -51,7 +51,7 @@ func TestCreate(t *testing.T) {
t.Fatalf("error getting image type from arch")
}
store := store.New(nil)
api := jobqueue.New(nil, store)
api := worker.New(nil, store)
id, err := store.PushCompose(imageType, &blueprint.Blueprint{}, nil, nil, nil, 0, nil)
if err != nil {
@ -73,7 +73,7 @@ func testUpdateTransition(t *testing.T, from, to string, expectedStatus int) {
t.Fatalf("error getting image type from arch")
}
store := store.New(nil)
api := jobqueue.New(nil, store)
api := worker.New(nil, store)
id := uuid.Nil
if from != "VOID" {

View file

@ -1,4 +1,4 @@
package jobqueue
package worker
import (
"bytes"

View file

@ -1,4 +1,4 @@
package jobqueue
package worker
import (
"github.com/google/uuid"