jobqueue: remove testjobqueue
testjobqueue did not implement the JobQueue interface correctly (noted in its package comment), making it impossible to write tests for JobQueue itself. Replace its use everywhere with fsjobqueue operating on a temporary directory.
This commit is contained in:
parent
90e15da032
commit
cb894ccf68
5 changed files with 266 additions and 241 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/fedoratest"
|
||||
|
|
@ -37,7 +38,11 @@ func executeTests(m *testing.M) int {
|
|||
}
|
||||
|
||||
// Create a mock API server listening on the temporary socket
|
||||
fixture := rpmmd_mock.BaseFixture()
|
||||
err = os.Mkdir(path.Join(tmpdir, "/jobs"), 0755)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fixture := rpmmd_mock.BaseFixture(path.Join(tmpdir, "/jobs"))
|
||||
rpm := rpmmd_mock.NewRPMMDMock(fixture)
|
||||
distro := fedoratest.New()
|
||||
arch, err := distro.GetArch("x86_64")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue